stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r548884 - /incubator/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp
Date Wed, 20 Jun 2007 01:28:36 GMT
Author: sebor
Date: Tue Jun 19 18:28:35 2007
New Revision: 548884

URL: http://svn.apache.org/viewvc?view=rev&rev=548884
Log:
2007-06-19  Martin Sebor  <sebor@roguewave.com>

	* 22.locale.numpunct.mt.cpp (<ios>): Removed #include directive.
	(run_test): Set LC_ALL rather than just LC_NUMERIC in order to
	get reliable results from mbstowcs().

Modified:
    incubator/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp

Modified: incubator/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp?view=diff&rev=548884&r1=548883&r2=548884
==============================================================================
--- incubator/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp (original)
+++ incubator/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp Tue Jun 19 18:28:35
2007
@@ -26,8 +26,7 @@
  *
  **************************************************************************/
 
-#include <ios>        // for ios
-#include <locale>     // for locale, num_put
+#include <locale>     // for locale, numpunct
 
 #include <clocale>    // for lconv, localeconv()
 #include <cstdlib>    // for mbstowcs()
@@ -178,7 +177,8 @@
 
         locales [inx] = name;
 
-        if (std::setlocale (LC_NUMERIC, name)) {
+        // set LC_NUMERIC and LC_CTYPE to be able to use mbstowcs()
+        if (std::setlocale (LC_ALL, name)) {
 
             const std::lconv* const pconv = std::localeconv ();
             NumPunctData* const pdata = punct_data + inx;



Mime
View raw message