stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r637392 - /stdcxx/trunk/tests/localization/22.locale.num.put.cpp
Date Sat, 15 Mar 2008 11:11:25 GMT
Author: faridz
Date: Sat Mar 15 04:11:23 2008
New Revision: 637392

URL: http://svn.apache.org/viewvc?rev=637392&view=rev
Log:
2008-03-15 Farid Zaripov <farid_zaripov@epam.com>

	* tests/localization/22.locale.num.put.cpp (dbl_test): Add precision
	in format specification of the expected result to reflect the
	resolution of the lwg issue 231.
	(ldbl_test): Ditto.

Modified:
    stdcxx/trunk/tests/localization/22.locale.num.put.cpp

Modified: stdcxx/trunk/tests/localization/22.locale.num.put.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.num.put.cpp?rev=637392&r1=637391&r2=637392&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.num.put.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.num.put.cpp Sat Mar 15 04:11:23 2008
@@ -1720,16 +1720,16 @@
 
     Punct<charT>::decimal_point_ = '.';
 
-    TEST (T,  0.0, 0, 0, 0, ' ', "", "%g");
-    TEST (T, -0.0, 0, 0, 0, ' ', "", "%g");
-    TEST (T,  1.0, 0, 0, 0, ' ', "", "%g");
+    TEST (T,  0.0, 0, 0, 0, ' ', "", "%.0g");
+    TEST (T, -0.0, 0, 0, 0, ' ', "", "%.0g");
+    TEST (T,  1.0, 0, 0, 0, ' ', "", "%.0g");
     TEST (T,  1.0, 0, 0, 0, ' ', "", "1");
-    TEST (T, -1.0, 0, 0, 0, ' ', "", "%g");
+    TEST (T, -1.0, 0, 0, 0, ' ', "", "%.0g");
     TEST (T, -1.0, 0, 0, 0, ' ', "", "-1");
-    TEST (T,  1.1, 0, 0, 0, ' ', "", "%g");
-    TEST (T,  1.1, 0, 0, 0, ' ', "", "1.1");
-    TEST (T, -1.1, 0, 0, 0, ' ', "", "%g");
-    TEST (T, -1.1, 0, 0, 0, ' ', "", "-1.1");
+    TEST (T,  1.1, 0, 0, 0, ' ', "", "%.0g");
+    TEST (T,  1.1, 0, 0, 0, ' ', "", "1");
+    TEST (T, -1.1, 0, 0, 0, ' ', "", "%.0g");
+    TEST (T, -1.1, 0, 0, 0, ' ', "", "-1");
 
 
     // exercise formatting of very large numbers in a fixed notation
@@ -1812,25 +1812,25 @@
 
     Punct<charT>::decimal_point_ = '.';
 
-    TEST (T,     0.0L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T,     1.0L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T,     2.1L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T,    -3.2L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T,    -4.3L, 0, 0, 0, ' ', "", "%Lg");
-
-    TEST (T, 1.0e+10L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T, 2.0e+20L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T, 4.0e+30L, 0, 0, 0, ' ', "", "%Lg");
-
-    TEST (T, 1.0e-10L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T, 2.0e-20L, 0, 0, 0, ' ', "", "%Lg");
-    TEST (T, 4.0e-30L, 0, 0, 0, ' ', "", "%Lg");
-
-    TEST (T, LDbl (CHAR_MAX),  0, 0, 0, ' ', "", "%Lg");
-    TEST (T, LDbl (UCHAR_MAX), 0, 0, 0, ' ', "", "%Lg");
-    TEST (T, LDbl (SCHAR_MAX), 0, 0, 0, ' ', "", "%Lg");
-    TEST (T, LDbl (SHRT_MAX),  0, 0, 0, ' ', "", "%Lg");
-    TEST (T, LDbl (USHRT_MAX), 0, 0, 0, ' ', "", "%Lg");
+    TEST (T,     0.0L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T,     1.0L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T,     2.1L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T,    -3.2L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T,    -4.3L, 0, 0, 0, ' ', "", "%.0Lg");
+
+    TEST (T, 1.0e+10L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, 2.0e+20L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, 4.0e+30L, 0, 0, 0, ' ', "", "%.0Lg");
+
+    TEST (T, 1.0e-10L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, 2.0e-20L, 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, 4.0e-30L, 0, 0, 0, ' ', "", "%.0Lg");
+
+    TEST (T, LDbl (CHAR_MAX),  0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, LDbl (UCHAR_MAX), 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, LDbl (SCHAR_MAX), 0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, LDbl (SHRT_MAX),  0, 0, 0, ' ', "", "%.0Lg");
+    TEST (T, LDbl (USHRT_MAX), 0, 0, 0, ' ', "", "%.0Lg");
 
     // specify greater precision than the default 6 for large numbers
     TEST (T, LDbl (INT_MAX),   0, 32, 0, ' ', "", "%.32Lg");



Mime
View raw message