You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/06/20 03:28:36 UTC
svn commit: r548884 -
/incubator/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp
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 <se...@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;