You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by fa...@apache.org on 2008/02/27 19:54:49 UTC

svn commit: r631676 - /stdcxx/trunk/tests/localization/22.locale.num.put.cpp

Author: faridz
Date: Wed Feb 27 10:54:46 2008
New Revision: 631676

URL: http://svn.apache.org/viewvc?rev=631676&view=rev
Log:
2008-02-27  Farid Zaripov  <fa...@epam.com>

	* tests/localization/22.locale.num.put.cpp
	(do_test): Fixed error in format string.
	(inf_nan_test): Corrected number of the issue.
	(ldbl_test): Added testcase with a precision == 0.

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=631676&r1=631675&r2=631676&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.num.put.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.num.put.cpp Wed Feb 27 10:54:46 2008
@@ -337,7 +337,7 @@
 
         // fail at most once for each specialization
         rw_assert (!width_fail++, 0, lineno,
-                   "%line d: num_put<%s>::put (..., %s = %s) "
+                   "line %d: num_put<%s>::put (..., %s = %s) "
                    "failed to reset width from %d; width() = %d",
                    __LINE__, cname, tname, TOSTR (val),
                    TOSTR (buf), width, ios.width ());
@@ -1576,7 +1576,7 @@
 #if 0
 
     // temporarily disabled (NAN format is platform specific
-    // and subject to bugs -- see for example STDCXX-460)
+    // and subject to bugs -- see for example STDCXX-464)
 
     const floatT nan = 0 / zero;
 
@@ -1917,6 +1917,8 @@
     TEST (T, Pi, SHOWALL (scientific),  0, 0, ' ', "", "+3.E+00", Eof, 3.0L);
 
     // with {g,G}, precision indicates the number of significant digits
+    // the precision == 0 should have the same effect as precision == 1
+    TEST (T, Pi, 0,  0, 0, ' ', "", "%.0Lg",  Eof, 3.0L);
     TEST (T, Pi, 0,  1, 0, ' ', "", "%.1Lg",  Eof, 3.0L);
     TEST (T, Pi, 0,  2, 0, ' ', "", "%.2Lg",  Eof, 3.1L);
     TEST (T, Pi, 0,  3, 0, ' ', "", "%.3Lg",  Eof, 3.14L);