[cfe-commits] [libcxx] r141003 - in /libcxx/trunk/test: ./ input.output/file.streams/fstreams/filebuf.virtuals/ input.output/iostream.format/ext.manip/ input.output/iostreams.base/ios.base/ios.base.callback/ input.output/iostreams.base/ios.base/ios.base.locales/ input.output/iostreams.base/ios/basic.ios.members/ input.output/stream.buffers/streambuf/streambuf.cons/ input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/ input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/ loca...

Howard Hinnant hhinnant at apple.com
Mon Oct 3 08:24:01 PDT 2011


Author: hhinnant
Date: Mon Oct  3 10:23:59 2011
New Revision: 141003

URL: http://llvm.org/viewvc/llvm-project?rev=141003&view=rev
Log:
Windows porting work by Ruben Van Boxem

Added:
    libcxx/trunk/test/platform_support.h
Modified:
    libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
    libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
    libcxx/trunk/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
    libcxx/trunk/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
    libcxx/trunk/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
    libcxx/trunk/test/input.output/iostream.format/ext.manip/put_time.pass.cpp
    libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp
    libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp
    libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
    libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp
    libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
    libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
    libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp
    libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp
    libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
    libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp
    libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
    libcxx/trunk/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
    libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
    libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
    libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/assign.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/copy.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/default.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.cons/string.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.members/name.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.operators/eq.pass.cpp
    libcxx/trunk/test/localization/locales/locale/locale.statics/global.pass.cpp
    libcxx/trunk/test/re/re.regex/re.regex.locale/imbue.pass.cpp
    libcxx/trunk/test/re/re.traits/default.pass.cpp
    libcxx/trunk/test/re/re.traits/getloc.pass.cpp
    libcxx/trunk/test/re/re.traits/imbue.pass.cpp
    libcxx/trunk/test/re/re.traits/translate_nocase.pass.cpp

Modified: libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp (original)
+++ libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,6 +16,8 @@
 #include <fstream>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct test_buf
     : public std::basic_filebuf<CharT>
@@ -115,7 +117,7 @@
     std::remove("overflow.dat");
     {
         test_buf<wchar_t> f;
-        f.pubimbue(std::locale("en_US.UTF-8"));
+        f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
         assert(f.open("overflow.dat", std::ios_base::out) != 0);
         assert(f.sputc(0x4E51) == 0x4E51);
         assert(f.sputc(0x4E52) == 0x4E52);

Modified: libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp (original)
+++ libcxx/trunk/test/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,6 +16,8 @@
 #include <fstream>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct test_buf
     : public std::basic_filebuf<CharT>
@@ -108,7 +110,7 @@
     }
     {
         test_buf<wchar_t> f;
-        f.pubimbue(std::locale("en_US.UTF-8"));
+        f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
         assert(f.open("underflow_utf8.dat", std::ios_base::in) != 0);
         assert(f.is_open());
         assert(f.sbumpc() == 0x4E51);

Modified: libcxx/trunk/test/input.output/iostream.format/ext.manip/get_money.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostream.format/ext.manip/get_money.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostream.format/ext.manip/get_money.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostream.format/ext.manip/get_money.pass.cpp Mon Oct  3 10:23:59 2011
@@ -14,6 +14,8 @@
 #include <iomanip>
 #include <cassert>
 
+#include "../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct testbuf
     : public std::basic_streambuf<CharT>
@@ -39,7 +41,7 @@
     {
         testbuf<char> sb("  -$1,234,567.89");
         std::istream is(&sb);
-        is.imbue(std::locale("en_US.UTF-8"));
+        is.imbue(std::locale(LOCALE_en_US_UTF_8));
         long double x = 0;
         is >> std::get_money(x, false);
         assert(x == -123456789);
@@ -47,7 +49,7 @@
     {
         testbuf<char> sb("  -USD 1,234,567.89");
         std::istream is(&sb);
-        is.imbue(std::locale("en_US.UTF-8"));
+        is.imbue(std::locale(LOCALE_en_US_UTF_8));
         long double x = 0;
         is >> std::get_money(x, true);
         assert(x == -123456789);
@@ -55,7 +57,7 @@
     {
         testbuf<wchar_t> sb(L"  -$1,234,567.89");
         std::wistream is(&sb);
-        is.imbue(std::locale("en_US.UTF-8"));
+        is.imbue(std::locale(LOCALE_en_US_UTF_8));
         long double x = 0;
         is >> std::get_money(x, false);
         assert(x == -123456789);
@@ -63,7 +65,7 @@
     {
         testbuf<wchar_t> sb(L"  -USD 1,234,567.89");
         std::wistream is(&sb);
-        is.imbue(std::locale("en_US.UTF-8"));
+        is.imbue(std::locale(LOCALE_en_US_UTF_8));
         long double x = 0;
         is >> std::get_money(x, true);
         assert(x == -123456789);

Modified: libcxx/trunk/test/input.output/iostream.format/ext.manip/get_time.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostream.format/ext.manip/get_time.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostream.format/ext.manip/get_time.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostream.format/ext.manip/get_time.pass.cpp Mon Oct  3 10:23:59 2011
@@ -14,6 +14,8 @@
 #include <iomanip>
 #include <cassert>
 
+#include "../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct testbuf
     : public std::basic_streambuf<CharT>
@@ -39,7 +41,7 @@
     {
         testbuf<char> sb("  Sat Dec 31 23:55:59 2061");
         std::istream is(&sb);
-        is.imbue(std::locale("en_US.UTF-8"));
+        is.imbue(std::locale(LOCALE_en_US_UTF_8));
         std::tm t = {0};
         is >> std::get_time(&t, "%c");
         assert(t.tm_sec == 59);
@@ -55,7 +57,7 @@
     {
         testbuf<wchar_t> sb(L"  Sat Dec 31 23:55:59 2061");
         std::wistream is(&sb);
-        is.imbue(std::locale("en_US.UTF-8"));
+        is.imbue(std::locale(LOCALE_en_US_UTF_8));
         std::tm t = {0};
         is >> std::get_time(&t, L"%c");
         assert(t.tm_sec == 59);

Modified: libcxx/trunk/test/input.output/iostream.format/ext.manip/put_money.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostream.format/ext.manip/put_money.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostream.format/ext.manip/put_money.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostream.format/ext.manip/put_money.pass.cpp Mon Oct  3 10:23:59 2011
@@ -14,6 +14,8 @@
 #include <iomanip>
 #include <cassert>
 
+#include "../../../platform_support.h" // locale name macros
+
 template <class CharT>
 class testbuf
     : public std::basic_streambuf<CharT>
@@ -51,7 +53,7 @@
     {
         testbuf<char> sb;
         std::ostream os(&sb);
-        os.imbue(std::locale("en_US.UTF-8"));
+        os.imbue(std::locale(LOCALE_en_US_UTF_8));
         showbase(os);
         long double x = -123456789;
         os << std::put_money(x, false);
@@ -60,7 +62,7 @@
     {
         testbuf<char> sb;
         std::ostream os(&sb);
-        os.imbue(std::locale("en_US.UTF-8"));
+        os.imbue(std::locale(LOCALE_en_US_UTF_8));
         showbase(os);
         long double x = -123456789;
         os << std::put_money(x, true);
@@ -69,7 +71,7 @@
     {
         testbuf<wchar_t> sb;
         std::wostream os(&sb);
-        os.imbue(std::locale("en_US.UTF-8"));
+        os.imbue(std::locale(LOCALE_en_US_UTF_8));
         showbase(os);
         long double x = -123456789;
         os << std::put_money(x, false);
@@ -78,7 +80,7 @@
     {
         testbuf<wchar_t> sb;
         std::wostream os(&sb);
-        os.imbue(std::locale("en_US.UTF-8"));
+        os.imbue(std::locale(LOCALE_en_US_UTF_8));
         showbase(os);
         long double x = -123456789;
         os << std::put_money(x, true);

Modified: libcxx/trunk/test/input.output/iostream.format/ext.manip/put_time.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostream.format/ext.manip/put_time.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostream.format/ext.manip/put_time.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostream.format/ext.manip/put_time.pass.cpp Mon Oct  3 10:23:59 2011
@@ -14,6 +14,8 @@
 #include <iomanip>
 #include <cassert>
 
+#include "../../../platform_support.h" // locale name macros
+
 template <class CharT>
 class testbuf
     : public std::basic_streambuf<CharT>
@@ -51,7 +53,7 @@
     {
         testbuf<char> sb;
         std::ostream os(&sb);
-        os.imbue(std::locale("en_US.UTF-8"));
+        os.imbue(std::locale(LOCALE_en_US_UTF_8));
         std::tm t = {0};
         t.tm_sec = 59;
         t.tm_min = 55;
@@ -66,7 +68,7 @@
     {
         testbuf<wchar_t> sb;
         std::wostream os(&sb);
-        os.imbue(std::locale("en_US.UTF-8"));
+        os.imbue(std::locale(LOCALE_en_US_UTF_8));
         std::tm t = {0};
         t.tm_sec = 59;
         t.tm_min = 55;

Modified: libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.callback/register_callback.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,6 +18,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class test
     : public std::ios
 {
@@ -34,7 +36,7 @@
 {
     if (ev == std::ios_base::imbue_event)
     {
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 4);
         ++f1_called;
     }
@@ -47,6 +49,6 @@
     b.register_callback(f1, 4);
     b.register_callback(f1, 4);
     b.register_callback(f1, 4);
-    std::locale l = b.imbue(std::locale("en_US.UTF-8"));
+    std::locale l = b.imbue(std::locale(LOCALE_en_US_UTF_8));
     assert(f1_called == 3);
 }

Modified: libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,6 +18,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class test
     : public std::ios
 {
@@ -39,7 +41,7 @@
         assert(!f1_called);
         assert( f2_called);
         assert( f3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 4);
         f1_called = true;
     }
@@ -52,7 +54,7 @@
         assert(!f1_called);
         assert(!f2_called);
         assert( f3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 5);
         f2_called = true;
     }
@@ -65,7 +67,7 @@
         assert(!f1_called);
         assert(!f2_called);
         assert(!f3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 6);
         f3_called = true;
     }
@@ -78,9 +80,9 @@
     b.register_callback(f1, 4);
     b.register_callback(f2, 5);
     b.register_callback(f3, 6);
-    std::locale l = b.imbue(std::locale("en_US.UTF-8"));
+    std::locale l = b.imbue(std::locale(LOCALE_en_US_UTF_8));
     assert(l.name() == std::string("C"));
-    assert(b.getloc().name() == std::string("en_US.UTF-8"));
+    assert(b.getloc().name() == std::string(LOCALE_en_US_UTF_8));
     assert(f1_called);
     assert(f2_called);
     assert(f3_called);

Modified: libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 struct testbuf
     : public std::streambuf
 {
@@ -38,7 +40,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert(!g3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 4);
         f1_called = true;
     }
@@ -53,7 +55,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert(!g3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 5);
         f2_called = true;
     }
@@ -68,7 +70,7 @@
         assert(!g1_called);
         assert( g2_called);
         assert( g3_called);
-        assert(stream.getloc().name() == "fr_FR.UTF-8");
+        assert(stream.getloc().name() == LOCALE_fr_FR_UTF_8);
         assert(index == 7);
         g1_called = true;
     }
@@ -83,7 +85,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert( g3_called);
-        assert(stream.getloc().name() == "fr_FR.UTF-8");
+        assert(stream.getloc().name() == LOCALE_fr_FR_UTF_8);
         assert(index == 8);
         g2_called = true;
     }
@@ -98,7 +100,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert(!g3_called);
-        assert(stream.getloc().name() == "fr_FR.UTF-8");
+        assert(stream.getloc().name() == LOCALE_fr_FR_UTF_8);
         assert(index == 9);
         g3_called = true;
     }
@@ -111,7 +113,7 @@
     ios1.flags(std::ios::boolalpha | std::ios::dec | std::ios::fixed);
     ios1.precision(1);
     ios1.width(11);
-    ios1.imbue(std::locale("en_US.UTF-8"));
+    ios1.imbue(std::locale(LOCALE_en_US_UTF_8));
     ios1.exceptions(std::ios::failbit);
     ios1.setstate(std::ios::eofbit);
     ios1.register_callback(f1, 4);
@@ -131,7 +133,7 @@
     ios2.flags(std::ios::showpoint | std::ios::uppercase);
     ios2.precision(2);
     ios2.width(12);
-    ios2.imbue(std::locale("fr_FR.UTF-8"));
+    ios2.imbue(std::locale(LOCALE_fr_FR_UTF_8));
     ios2.exceptions(std::ios::eofbit);
     ios2.setstate(std::ios::goodbit);
     ios2.register_callback(g1, 7);
@@ -165,7 +167,7 @@
     assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
     assert(ios1.precision() == 2);
     assert(ios1.width() == 12);
-    assert(ios1.getloc().name() == "fr_FR.UTF-8");
+    assert(ios1.getloc().name() == LOCALE_fr_FR_UTF_8);
     assert(ios1.exceptions() == std::ios::eofbit);
     assert(f1_called);
     assert(f2_called);

Modified: libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/imbue.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 struct testbuf
     : public std::streambuf
 {
@@ -33,7 +35,7 @@
         assert(!f1_called);
         assert( f2_called);
         assert( f3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 4);
         f1_called = true;
     }
@@ -46,7 +48,7 @@
         assert(!f1_called);
         assert(!f2_called);
         assert( f3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 5);
         f2_called = true;
     }
@@ -59,7 +61,7 @@
         assert(!f1_called);
         assert(!f2_called);
         assert(!f3_called);
-        assert(stream.getloc().name() == "en_US.UTF-8");
+        assert(stream.getloc().name() == LOCALE_en_US_UTF_8);
         assert(index == 6);
         f3_called = true;
     }
@@ -72,9 +74,9 @@
         ios.register_callback(f1, 4);
         ios.register_callback(f2, 5);
         ios.register_callback(f3, 6);
-        std::locale l = ios.imbue(std::locale("en_US.UTF-8"));
+        std::locale l = ios.imbue(std::locale(LOCALE_en_US_UTF_8));
         assert(l.name() == std::string("C"));
-        assert(ios.getloc().name() == std::string("en_US.UTF-8"));
+        assert(ios.getloc().name() == std::string(LOCALE_en_US_UTF_8));
         assert(f1_called);
         assert(f2_called);
         assert(f3_called);
@@ -88,10 +90,10 @@
         ios.register_callback(f1, 4);
         ios.register_callback(f2, 5);
         ios.register_callback(f3, 6);
-        std::locale l = ios.imbue(std::locale("en_US.UTF-8"));
+        std::locale l = ios.imbue(std::locale(LOCALE_en_US_UTF_8));
         assert(l.name() == std::string("C"));
-        assert(ios.getloc().name() == std::string("en_US.UTF-8"));
-        assert(sb.getloc().name() == std::string("en_US.UTF-8"));
+        assert(ios.getloc().name() == std::string(LOCALE_en_US_UTF_8));
+        assert(sb.getloc().name() == std::string(LOCALE_en_US_UTF_8));
         assert(f1_called);
         assert(f2_called);
         assert(f3_called);

Modified: libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 struct testbuf
     : public std::streambuf
 {
@@ -82,7 +84,7 @@
     ios2.flags(std::ios::showpoint | std::ios::uppercase);
     ios2.precision(2);
     ios2.width(12);
-    ios2.imbue(std::locale("fr_FR.UTF-8"));
+    ios2.imbue(std::locale(LOCALE_fr_FR_UTF_8));
     ios2.exceptions(std::ios::eofbit);
     ios2.setstate(std::ios::goodbit);
     ios2.register_callback(g1, 7);
@@ -107,7 +109,7 @@
     assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
     assert(ios1.precision() == 2);
     assert(ios1.width() == 12);
-    assert(ios1.getloc().name() == "fr_FR.UTF-8");
+    assert(ios1.getloc().name() == LOCALE_fr_FR_UTF_8);
     assert(ios1.exceptions() == std::ios::eofbit);
     assert(!f1_called);
     assert(!f2_called);

Modified: libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 struct testbuf
     : public std::streambuf
 {
@@ -73,7 +75,7 @@
     ios1.flags(std::ios::boolalpha | std::ios::dec | std::ios::fixed);
     ios1.precision(1);
     ios1.width(11);
-    ios1.imbue(std::locale("en_US.UTF-8"));
+    ios1.imbue(std::locale(LOCALE_en_US_UTF_8));
     ios1.exceptions(std::ios::failbit);
     ios1.setstate(std::ios::eofbit);
     ios1.register_callback(f1, 4);
@@ -93,7 +95,7 @@
     ios2.flags(std::ios::showpoint | std::ios::uppercase);
     ios2.precision(2);
     ios2.width(12);
-    ios2.imbue(std::locale("fr_FR.UTF-8"));
+    ios2.imbue(std::locale(LOCALE_fr_FR_UTF_8));
     ios2.exceptions(std::ios::eofbit);
     ios2.setstate(std::ios::goodbit);
     ios2.register_callback(g1, 7);
@@ -118,7 +120,7 @@
     assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
     assert(ios1.precision() == 2);
     assert(ios1.width() == 12);
-    assert(ios1.getloc().name() == "fr_FR.UTF-8");
+    assert(ios1.getloc().name() == LOCALE_fr_FR_UTF_8);
     assert(ios1.exceptions() == std::ios::eofbit);
     assert(!f1_called);
     assert(!f2_called);
@@ -147,7 +149,7 @@
     assert(ios2.flags() == (std::ios::boolalpha | std::ios::dec | std::ios::fixed));
     assert(ios2.precision() == 1);
     assert(ios2.width() == 11);
-    assert(ios2.getloc().name() == "en_US.UTF-8");
+    assert(ios2.getloc().name() == LOCALE_en_US_UTF_8);
     assert(ios2.exceptions() == std::ios::failbit);
     assert(ios2.iword(0) == 1);
     assert(ios2.iword(1) == 2);

Modified: libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp (original)
+++ libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/copy.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct test
     : public std::basic_streambuf<CharT>
@@ -70,7 +72,7 @@
         t.setp(&p1, &p3);
         test<wchar_t> t2 = t;
     }
-    std::locale::global(std::locale("en_US.UTF-8"));
+    std::locale::global(std::locale(LOCALE_en_US_UTF_8));
     {
         test<char> t;
         test<char> t2 = t;

Modified: libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp (original)
+++ libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.cons/default.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct test
     : public std::basic_streambuf<CharT>
@@ -42,13 +44,13 @@
         test<wchar_t> t;
         assert(t.getloc().name() == "C");
     }
-    std::locale::global(std::locale("en_US.UTF-8"));
+    std::locale::global(std::locale(LOCALE_en_US_UTF_8));
     {
         test<char> t;
-        assert(t.getloc().name() == "en_US.UTF-8");
+        assert(t.getloc().name() == LOCALE_en_US_UTF_8);
     }
     {
         test<wchar_t> t;
-        assert(t.getloc().name() == "en_US.UTF-8");
+        assert(t.getloc().name() == LOCALE_en_US_UTF_8);
     }
 }

Modified: libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp (original)
+++ libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,6 +18,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct test
     : public std::basic_streambuf<CharT>
@@ -26,7 +28,7 @@
 
     void imbue(const std::locale&)
     {
-        assert(this->getloc().name() == "en_US.UTF-8");
+        assert(this->getloc().name() == LOCALE_en_US_UTF_8);
     }
 };
 
@@ -36,11 +38,11 @@
         test<char> t;
         assert(t.getloc().name() == "C");
     }
-    std::locale::global(std::locale("en_US.UTF-8"));
+    std::locale::global(std::locale(LOCALE_en_US_UTF_8));
     {
         test<char> t;
-        assert(t.getloc().name() == "en_US.UTF-8");
-        assert(t.pubimbue(std::locale("fr_FR.UTF-8")).name() == "en_US.UTF-8");
-        assert(t.getloc().name() == "fr_FR.UTF-8");
+        assert(t.getloc().name() == LOCALE_en_US_UTF_8);
+        assert(t.pubimbue(std::locale(LOCALE_fr_FR_UTF_8)).name() == "en_US.UTF-8");
+        assert(t.getloc().name() == LOCALE_fr_FR_UTF_8);
     }
 }

Modified: libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp (original)
+++ libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/assign.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct test
     : public std::basic_streambuf<CharT>
@@ -75,7 +77,7 @@
         test<wchar_t> t2;
         t2 = t;
     }
-    std::locale::global(std::locale("en_US.UTF-8"));
+    std::locale::global(std::locale(LOCALE_en_US_UTF_8));
     {
         test<char> t;
         test<char> t2;

Modified: libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp (original)
+++ libcxx/trunk/test/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.assign/swap.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <streambuf>
 #include <cassert>
 
+#include "../../../../../platform_support.h" // locale name macros
+
 template <class CharT>
 struct test
     : public std::basic_streambuf<CharT>
@@ -85,7 +87,7 @@
         test<wchar_t> t2;
         swap(t2, t);
     }
-    std::locale::global(std::locale("en_US.UTF-8"));
+    std::locale::global(std::locale(LOCALE_en_US_UTF_8));
     {
         test<char> t;
         test<char> t2;

Modified: libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp Mon Oct  3 10:23:59 2011
@@ -24,10 +24,12 @@
 
 #include <stdio.h>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
             std::string s2("aaaaaaA");

Modified: libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,9 +19,11 @@
 #include <string>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
-    std::locale l("en_US.UTF-8");
+    std::locale l(LOCALE_en_US_UTF_8);
     {
         std::string x1("1234");
         std::string x2("12345");

Modified: libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,12 +19,14 @@
 
 #include <stdio.h>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     // Ensure that the default locale is not C.  If it is, the second tests will fail.
-    setenv("LANG", "en_US.UTF-8", 1);
+    putenv(const_cast<char*>("LANG=" LOCALE_en_US_UTF_8));
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             std::string x("1234");
             const std::collate<char>& f = std::use_facet<std::collate<char> >(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp Mon Oct  3 10:23:59 2011
@@ -27,9 +27,11 @@
 
 #include <stdio.h>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
-    std::locale l("en_US.UTF-8");
+    std::locale l(LOCALE_en_US_UTF_8);
     {
         assert(std::has_facet<std::collate_byname<char> >(l));
         assert(&std::use_facet<std::collate<char> >(l)

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef std::codecvt_byname<wchar_t, char, std::mbstate_t> F;
 
 class my_facet
@@ -38,12 +40,12 @@
 int main()
 {
     {
-        std::locale l(std::locale::classic(), new my_facet("en_US.UTF-8"));
+        std::locale l(std::locale::classic(), new my_facet(LOCALE_en_US_UTF_8));
         assert(my_facet::count == 1);
     }
     assert(my_facet::count == 0);
     {
-        my_facet f("en_US.UTF-8", 1);
+        my_facet f(LOCALE_en_US_UTF_8, 1);
         assert(my_facet::count == 1);
         {
             std::locale l(std::locale::classic(), &f);
@@ -53,12 +55,12 @@
     }
     assert(my_facet::count == 0);
     {
-        std::locale l(std::locale::classic(), new my_facet(std::string("en_US.UTF-8")));
+        std::locale l(std::locale::classic(), new my_facet(std::string(LOCALE_en_US_UTF_8)));
         assert(my_facet::count == 1);
     }
     assert(my_facet::count == 0);
     {
-        my_facet f(std::string("en_US.UTF-8"), 1);
+        my_facet f(std::string(LOCALE_en_US_UTF_8), 1);
         assert(my_facet::count == 1);
         {
             std::locale l(std::locale::classic(), &f);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,10 +17,12 @@
 #include <type_traits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,10 +20,12 @@
 
 #include <stdio.h>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,10 +16,12 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l(std::string("fr_CA.ISO8859-1"));
+        std::locale l(std::string(LOCALE_fr_CA_ISO8859_1));
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);
@@ -34,7 +36,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,10 +18,12 @@
 #include <vector>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("fr_CA.ISO8859-1");
+        std::locale l(LOCALE_fr_CA_ISO8859_1);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);
@@ -39,7 +41,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,10 +20,12 @@
 
 #include <stdio.h>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,10 +20,12 @@
 
 #include <stdio.h>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,10 +16,12 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<char> F;
             const F& f = std::use_facet<F>(l);
@@ -51,7 +53,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,10 +17,12 @@
 #include <string>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<char> F;
             const F& f = std::use_facet<F>(l);
@@ -54,7 +56,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,10 +16,12 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<char> F;
             const F& f = std::use_facet<F>(l);
@@ -51,7 +53,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,10 +17,12 @@
 #include <string>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<char> F;
             const F& f = std::use_facet<F>(l);
@@ -54,7 +56,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp Mon Oct  3 10:23:59 2011
@@ -25,10 +25,12 @@
 #include <type_traits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             assert(std::has_facet<std::ctype_byname<char> >(l));
             assert(&std::use_facet<std::ctype<char> >(l)

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,10 +19,12 @@
 #include <cassert>
 #include <limits.h>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,10 +20,12 @@
 #include <vector>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef std::ctype<wchar_t> F;
             const F& f = std::use_facet<F>(l);

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_get<char, input_iterator<const char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("en_US.UTF-8");
+    std::string loc_name(LOCALE_en_US_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_get<char, input_iterator<const char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("fr_FR.UTF-8");
+    std::string loc_name(LOCALE_fr_FR_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_get<char, input_iterator<const char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("ru_RU.UTF-8");
+    std::string loc_name("LOCALE_ru_RU_UTF_8");
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_get<char, input_iterator<const char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("zh_CN.UTF-8");
+    std::string loc_name(LOCALE_zh_CN_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_get<char, input_iterator<const char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("en_US.UTF-8");
+    std::string loc_name(LOCALE_en_US_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_put<char, output_iterator<char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("en_US.UTF-8");
+    std::string loc_name(LOCALE_en_US_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_put<char, output_iterator<char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("fr_FR.UTF-8");
+    std::string loc_name(LOCALE_fr_FR_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_put<char, output_iterator<char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("ru_RU.UTF-8");
+    std::string loc_name(LOCALE_ru_RU_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_put<char, output_iterator<char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("zh_CN.UTF-8");
+    std::string loc_name(LOCALE_zh_CN_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp Mon Oct  3 10:23:59 2011
@@ -20,6 +20,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../../platform_support.h" // locale name macros
+
 typedef std::money_put<char, output_iterator<char*> > Fn;
 
 class my_facet
@@ -43,7 +45,7 @@
 int main()
 {
     std::ios ios(0);
-    std::string loc_name("en_US.UTF-8");
+    std::string loc_name(LOCALE_en_US_UTF_8);
     ios.imbue(std::locale(ios.getloc(),
                           new std::moneypunct_byname<char, false>(loc_name)));
     ios.imbue(std::locale(ios.getloc(),

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -69,70 +71,70 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         assert(f.curr_symbol() == "$");
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         assert(f.curr_symbol() == "USD ");
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         assert(f.curr_symbol() == L"$");
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         assert(f.curr_symbol() == L"USD ");
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.curr_symbol() == "Eu");
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.curr_symbol() == "EUR ");
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.curr_symbol() == L"Eu");
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.curr_symbol() == L"EUR ");
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.curr_symbol() == "\xD1\x80\xD1\x83\xD0\xB1"".");
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.curr_symbol() == "RUB ");
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.curr_symbol() == L"\x440\x443\x431"".");
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.curr_symbol() == L"RUB ");
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.curr_symbol() == "\xEF\xBF\xA5");
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.curr_symbol() == "CNY ");
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.curr_symbol() == L"\xFFE5");
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.curr_symbol() == L"CNY ");
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -69,70 +71,70 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         assert(f.decimal_point() == '.');
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         assert(f.decimal_point() == '.');
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         assert(f.decimal_point() == L'.');
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         assert(f.decimal_point() == L'.');
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.decimal_point() == ',');
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.decimal_point() == ',');
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.decimal_point() == L',');
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.decimal_point() == L',');
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.decimal_point() == ',');
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.decimal_point() == ',');
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.decimal_point() == L',');
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.decimal_point() == L',');
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.decimal_point() == '.');
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.decimal_point() == '.');
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.decimal_point() == L'.');
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.decimal_point() == L'.');
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -69,70 +71,70 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.frac_digits() == 2);
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -72,70 +74,70 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.grouping() == "\3\3");
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -85,7 +87,7 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -93,7 +95,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -101,7 +103,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -109,7 +111,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -118,7 +120,7 @@
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::value);
         assert(p.field[1] == std::money_base::space);
@@ -126,7 +128,7 @@
         assert(p.field[3] == std::money_base::sign);
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::value);
         assert(p.field[1] == std::money_base::space);
@@ -134,7 +136,7 @@
         assert(p.field[3] == std::money_base::sign);
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::value);
         assert(p.field[1] == std::money_base::space);
@@ -142,7 +144,7 @@
         assert(p.field[3] == std::money_base::sign);
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::value);
         assert(p.field[1] == std::money_base::space);
@@ -151,7 +153,7 @@
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -159,7 +161,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -167,7 +169,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -175,7 +177,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -184,7 +186,7 @@
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::symbol);
         assert(p.field[1] == std::money_base::sign);
@@ -192,7 +194,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::symbol);
         assert(p.field[1] == std::money_base::sign);
@@ -200,7 +202,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::symbol);
         assert(p.field[1] == std::money_base::sign);
@@ -208,7 +210,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.neg_format();
         assert(p.field[0] == std::money_base::symbol);
         assert(p.field[1] == std::money_base::sign);

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -69,70 +71,70 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.negative_sign() == "-");
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.negative_sign() == L"-");
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -85,7 +87,7 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -93,7 +95,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -101,7 +103,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -109,7 +111,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -118,7 +120,7 @@
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -126,7 +128,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -134,7 +136,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -142,7 +144,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -151,7 +153,7 @@
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -159,7 +161,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -167,7 +169,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -175,7 +177,7 @@
         assert(p.field[3] == std::money_base::symbol);
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::value);
@@ -184,7 +186,7 @@
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -192,7 +194,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -200,7 +202,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);
@@ -208,7 +210,7 @@
         assert(p.field[3] == std::money_base::value);
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         std::money_base::pattern p = f.pos_format();
         assert(p.field[0] == std::money_base::sign);
         assert(p.field[1] == std::money_base::symbol);

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -69,70 +71,70 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.positive_sign() == "");
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.positive_sign() == L"");
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <limits>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 class Fnf
     : public std::moneypunct_byname<char, false>
 {
@@ -69,70 +71,70 @@
     }
 
     {
-        Fnf f("en_US.UTF-8", 1);
+        Fnf f(LOCALE_en_US_UTF_8, 1);
         assert(f.thousands_sep() == ',');
     }
     {
-        Fnt f("en_US.UTF-8", 1);
+        Fnt f(LOCALE_en_US_UTF_8, 1);
         assert(f.thousands_sep() == ',');
     }
     {
-        Fwf f("en_US.UTF-8", 1);
+        Fwf f(LOCALE_en_US_UTF_8, 1);
         assert(f.thousands_sep() == L',');
     }
     {
-        Fwt f("en_US.UTF-8", 1);
+        Fwt f(LOCALE_en_US_UTF_8, 1);
         assert(f.thousands_sep() == L',');
     }
 
     {
-        Fnf f("fr_FR.UTF-8", 1);
+        Fnf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.thousands_sep() == ' ');
     }
     {
-        Fnt f("fr_FR.UTF-8", 1);
+        Fnt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.thousands_sep() == ' ');
     }
     {
-        Fwf f("fr_FR.UTF-8", 1);
+        Fwf f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.thousands_sep() == L' ');
     }
     {
-        Fwt f("fr_FR.UTF-8", 1);
+        Fwt f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.thousands_sep() == L' ');
     }
 
     {
-        Fnf f("ru_RU.UTF-8", 1);
+        Fnf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.thousands_sep() == ' ');
     }
     {
-        Fnt f("ru_RU.UTF-8", 1);
+        Fnt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.thousands_sep() == ' ');
     }
     {
-        Fwf f("ru_RU.UTF-8", 1);
+        Fwf f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.thousands_sep() == L' ');
     }
     {
-        Fwt f("ru_RU.UTF-8", 1);
+        Fwt f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.thousands_sep() == L' ');
     }
 
     {
-        Fnf f("zh_CN.UTF-8", 1);
+        Fnf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.thousands_sep() == ',');
     }
     {
-        Fnt f("zh_CN.UTF-8", 1);
+        Fnt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.thousands_sep() == ',');
     }
     {
-        Fwf f("zh_CN.UTF-8", 1);
+        Fwf f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.thousands_sep() == L',');
     }
     {
-        Fwt f("zh_CN.UTF-8", 1);
+        Fwt f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.thousands_sep() == L',');
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef std::time_get_byname<char, input_iterator<const char*> > F;
 
 class my_facet
@@ -30,19 +32,19 @@
 int main()
 {
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         assert(f.date_order() == std::time_base::mdy);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.date_order() == std::time_base::dmy);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.date_order() == std::time_base::dmy);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.date_order() == std::time_base::ymd);
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef std::time_get_byname<wchar_t, input_iterator<const wchar_t*> > F;
 
 class my_facet
@@ -30,19 +32,19 @@
 int main()
 {
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         assert(f.date_order() == std::time_base::mdy);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         assert(f.date_order() == std::time_base::dmy);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         assert(f.date_order() == std::time_base::dmy);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         assert(f.date_order() == std::time_base::ymd);
     }
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const char*> I;
 
 typedef std::time_get_byname<char, I> F;
@@ -37,7 +39,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const char in[] = "06/10/2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -49,7 +51,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "10.06.2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -61,7 +63,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const char in[] = "10.06.2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -73,7 +75,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "2009/06/10";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const wchar_t*> I;
 
 typedef std::time_get_byname<wchar_t, I> F;
@@ -37,7 +39,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const wchar_t in[] = L"06/10/2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -49,7 +51,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"10.06.2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -61,7 +63,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const wchar_t in[] = L"10.06.2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -73,7 +75,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const wchar_t in[] = L"2009/06/10";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const char*> I;
 
 typedef std::time_get_byname<char, I> F;
@@ -37,7 +39,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const char in[] = "June";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -47,7 +49,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "juin";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -57,7 +59,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const char in[] = "\xD0\xB8\xD1\x8E\xD0\xBD\xD1\x8F";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -67,7 +69,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "\xE5\x85\xAD\xE6\x9C\x88";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const wchar_t*> I;
 
 typedef std::time_get_byname<wchar_t, I> F;
@@ -46,7 +48,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const wchar_t in[] = L"June";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -56,7 +58,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"juin";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -66,7 +68,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const wchar_t in[] = L"\x438\x44E\x43D\x44F";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -76,7 +78,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const wchar_t in[] = L"\x516D\x6708";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,6 +18,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const char*> I;
 
 typedef std::time_get_byname<char, I> F;
@@ -36,7 +38,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const char in[] = "Sat Dec 31 23:55:59 2061";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -52,7 +54,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const char in[] = "23:55:59";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -64,7 +66,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "Sam 31 d""\xC3\xA9""c 23:55:59 2061";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -80,7 +82,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "23:55:59";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -92,7 +94,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const char in[] = "\xD1\x81\xD1\x83\xD0\xB1\xD0\xB1"
                           "\xD0\xBE\xD1\x82\xD0\xB0"
                           ", 31 "
@@ -115,7 +117,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const char in[] = "23:55:59";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -127,7 +129,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "\xE5\x85\xAD"
                           " 12/31 23:55:59 2061";
         err = std::ios_base::goodbit;
@@ -144,7 +146,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "23""\xE6\x97\xB6""55""\xE5\x88\x86""59""\xE7\xA7\x92";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,6 +18,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const wchar_t*> I;
 
 typedef std::time_get_byname<wchar_t, I> F;
@@ -36,7 +38,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const wchar_t in[] = L"Sat Dec 31 23:55:59 2061";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -52,7 +54,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const wchar_t in[] = L"23:55:59";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -64,7 +66,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"Sam 31 d""\xE9""c 23:55:59 2061";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -80,7 +82,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"23:55:59";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -115,7 +117,7 @@
     }
 #endif
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const wchar_t in[] = L"23:55:59";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -144,8 +146,9 @@
         assert(t.tm_wday == 6);
         assert(err == std::ios_base::eofbit);
     }
+#endif
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const wchar_t in[] = L"23""\x65F6""55""\x5206""59""\x79D2";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -156,5 +159,4 @@
         assert(t.tm_hour == 23);
         assert(err == std::ios_base::eofbit);
     }
-#endif
 }

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const char*> I;
 
 typedef std::time_get_byname<char, I> F;
@@ -37,7 +39,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const char in[] = "13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -49,7 +51,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -61,7 +63,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const char in[] = "13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -73,7 +75,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const wchar_t*> I;
 
 typedef std::time_get_byname<wchar_t, I> F;
@@ -37,7 +39,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const wchar_t in[] = L"13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -49,7 +51,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -61,7 +63,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const wchar_t in[] = L"13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -73,7 +75,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const wchar_t in[] = L"13:14:15";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const char*> I;
 
 typedef std::time_get_byname<char, I> F;
@@ -37,7 +39,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const char in[] = "Monday";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -47,7 +49,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "Lundi";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -57,7 +59,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const char in[] = "\xD0\xBF\xD0\xBE\xD0\xBD\xD0\xB5"
                           "\xD0\xB4\xD0\xB5\xD0\xBB\xD1\x8C"
                           "\xD0\xBD\xD0\xB8\xD0\xBA";
@@ -69,7 +71,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "\xE6\x98\x9F\xE6\x9C\x9F\xE4\xB8\x80";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp Mon Oct  3 10:23:59 2011
@@ -19,6 +19,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const wchar_t*> I;
 
 typedef std::time_get_byname<wchar_t, I> F;
@@ -37,7 +39,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const wchar_t in[] = L"Monday";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -47,7 +49,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"Lundi";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -57,7 +59,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const wchar_t in[] = L"\x43F\x43E\x43D\x435\x434\x435\x43B\x44C\x43D\x438\x43A";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -67,7 +69,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const wchar_t in[] = L"\x661F\x671F\x4E00";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,6 +18,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const char*> I;
 
 typedef std::time_get_byname<char, I> F;
@@ -36,7 +38,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const char in[] = "2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -46,7 +48,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -56,7 +58,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const char in[] = "2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -66,7 +68,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "2009";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp Mon Oct  3 10:23:59 2011
@@ -18,6 +18,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef input_iterator<const wchar_t*> I;
 
 typedef std::time_get_byname<wchar_t, I> F;
@@ -36,7 +38,7 @@
     std::ios_base::iostate err;
     std::tm t;
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         const wchar_t in[] = L"2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -46,7 +48,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -56,7 +58,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("ru_RU.UTF-8", 1);
+        const my_facet f(LOCALE_ru_RU_UTF_8, 1);
         const wchar_t in[] = L"2009";
         err = std::ios_base::goodbit;
         t = std::tm();
@@ -66,7 +68,7 @@
         assert(err == std::ios_base::eofbit);
     }
     {
-        const my_facet f("zh_CN.UTF-8", 1);
+        const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const wchar_t in[] = L"2009";
         err = std::ios_base::goodbit;
         t = std::tm();

Modified: libcxx/trunk/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp Mon Oct  3 10:23:59 2011
@@ -25,6 +25,8 @@
 #include <cassert>
 #include "iterators.h"
 
+#include "../../../../platform_support.h" // locale name macros
+
 typedef std::time_put_byname<char, output_iterator<char*> > F;
 
 class my_facet
@@ -51,7 +53,7 @@
     t.tm_isdst = 1;
     std::ios ios(0);
     {
-        const my_facet f("en_US.UTF-8", 1);
+        const my_facet f(LOCALE_en_US_UTF_8, 1);
         std::string pat("Today is %A which is abreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());
@@ -59,7 +61,7 @@
         assert(ex == "Today is Saturday which is abreviated Sat.");
     }
     {
-        const my_facet f("fr_FR.UTF-8", 1);
+        const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         std::string pat("Today is %A which is abreviated %a.");
         iter = f.put(output_iterator<char*>(str), ios, '*', &t,
                      pat.data(), pat.data() + pat.size());

Modified: libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,6 +16,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
@@ -32,7 +34,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef char C;
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
@@ -45,7 +47,7 @@
         }
     }
     {
-        std::locale l("fr_FR.UTF-8");
+        std::locale l(LOCALE_fr_FR_UTF_8);
         {
             typedef char C;
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);

Modified: libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,6 +16,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
@@ -32,7 +34,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef char C;
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
@@ -45,7 +47,7 @@
         }
     }
     {
-        std::locale l("fr_FR.UTF-8");
+        std::locale l(LOCALE_fr_FR_UTF_8);
         {
             typedef char C;
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);

Modified: libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp (original)
+++ libcxx/trunk/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,6 +16,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
@@ -32,7 +34,7 @@
         }
     }
     {
-        std::locale l("en_US.UTF-8");
+        std::locale l(LOCALE_en_US_UTF_8);
         {
             typedef char C;
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
@@ -45,7 +47,7 @@
         }
     }
     {
-        std::locale l("fr_FR.UTF-8");
+        std::locale l(LOCALE_fr_FR_UTF_8);
         {
             typedef char C;
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/assign.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/assign.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/assign.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <cassert>
 #include <new>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -67,7 +69,7 @@
 int main()
 {
     {
-        std::locale loc("ru_RU.UTF-8");
+        std::locale loc(LOCALE_ru_RU_UTF_8);
         std::locale loc2;
         loc2 = loc;
         assert(loc == loc2);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <new>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -67,12 +69,12 @@
 int main()
 {
     {
-        std::locale loc("ru_RU.UTF-8");
+        std::locale loc(LOCALE_ru_RU_UTF_8);
         check(loc);
-        std::locale loc2("ru_RU.UTF-8");
+        std::locale loc2(LOCALE_ru_RU_UTF_8);
         check(loc2);
         assert(loc == loc2);
-        std::locale loc3("zh_CN.UTF-8");
+        std::locale loc3(LOCALE_zh_CN_UTF_8);
         check(loc3);
         assert(!(loc == loc3));
         assert(loc != loc3);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/copy.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/copy.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/copy.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <cassert>
 #include <new>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -67,7 +69,7 @@
 int main()
 {
     {
-        std::locale loc("fr_FR.UTF-8");
+        std::locale loc(LOCALE_fr_FR_UTF_8);
         std::locale loc2 = loc;
         assert(loc == loc2);
         check(loc);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/default.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/default.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/default.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <new>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -74,13 +76,13 @@
         assert(new_called == 0);
         check(loc);
         assert(new_called == 0);
-        assert(std::locale::global(std::locale("en_US.UTF-8")) == loc);
+        assert(std::locale::global(std::locale(LOCALE_en_US_UTF_8)) == loc);
         ok = new_called;
         std::locale loc2;
         assert(new_called == ok);
         check(loc2);
         assert(new_called == ok);
-        assert(loc2 == std::locale("en_US.UTF-8"));
+        assert(loc2 == std::locale(LOCALE_en_US_UTF_8));
         assert(new_called == ok);
     }
     assert(new_called == ok);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <new>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -67,9 +69,9 @@
 int main()
 {
     {
-        std::locale loc("ru_RU.UTF-8");
+        std::locale loc(LOCALE_ru_RU_UTF_8);
         check(loc);
-        std::locale loc2(loc, "en_US.UTF-8", std::locale::monetary);
+        std::locale loc2(loc, LOCALE_en_US_UTF_8, std::locale::monetary);
         check(loc2);
     }
     assert(new_called == 0);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <new>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -78,7 +80,7 @@
 {
 {
     {
-        std::locale loc("ru_RU.UTF-8");
+        std::locale loc(LOCALE_ru_RU_UTF_8);
         check(loc);
         std::locale loc2(loc, new my_facet);
         check(loc2);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <new>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -67,9 +69,9 @@
 int main()
 {
     {
-        std::locale loc("ru_RU.UTF-8");
+        std::locale loc(LOCALE_ru_RU_UTF_8);
         check(loc);
-        std::locale loc2(loc, std::locale("en_US.UTF-8"), std::locale::monetary);
+        std::locale loc2(loc, std::locale(LOCALE_en_US_UTF_8), std::locale::monetary);
         check(loc2);
     }
     assert(new_called == 0);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <new>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -67,9 +69,9 @@
 int main()
 {
     {
-        std::locale loc("ru_RU.UTF-8");
+        std::locale loc(LOCALE_ru_RU_UTF_8);
         check(loc);
-        std::locale loc2(loc, std::string("en_US.UTF-8"), std::locale::monetary);
+        std::locale loc2(loc, std::string(LOCALE_en_US_UTF_8), std::locale::monetary);
         check(loc2);
     }
     assert(new_called == 0);

Modified: libcxx/trunk/test/localization/locales/locale/locale.cons/string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.cons/string.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.cons/string.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.cons/string.pass.cpp Mon Oct  3 10:23:59 2011
@@ -15,6 +15,8 @@
 #include <new>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int new_called = 0;
 
 void* operator new(std::size_t s) throw(std::bad_alloc)
@@ -67,12 +69,12 @@
 int main()
 {
     {
-        std::locale loc(std::string("ru_RU.UTF-8"));
+        std::locale loc(std::string(LOCALE_ru_RU_UTF_8));
         check(loc);
-        std::locale loc2(std::string("ru_RU.UTF-8"));
+        std::locale loc2(std::string(LOCALE_ru_RU_UTF_8));
         check(loc2);
         assert(loc == loc2);
-        std::locale loc3(std::string("zh_CN.UTF-8"));
+        std::locale loc3(std::string(LOCALE_zh_CN_UTF_8));
         check(loc3);
         assert(!(loc == loc3));
         assert(loc != loc3);

Modified: libcxx/trunk/test/localization/locales/locale/locale.members/name.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.members/name.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.members/name.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.members/name.pass.cpp Mon Oct  3 10:23:59 2011
@@ -14,6 +14,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     {
@@ -21,7 +23,7 @@
         assert(loc.name() == "C");
     }
     {
-        std::locale loc("en_US.UTF-8");
-        assert(loc.name() == "en_US.UTF-8");
+        std::locale loc(LOCALE_en_US_UTF_8);
+        assert(loc.name() == LOCALE_en_US_UTF_8);
     }
 }

Modified: libcxx/trunk/test/localization/locales/locale/locale.operators/eq.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.operators/eq.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.operators/eq.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.operators/eq.pass.cpp Mon Oct  3 10:23:59 2011
@@ -14,12 +14,14 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 int main()
 {
     std::locale cloc;
     std::locale copy(cloc);
-    std::locale n1("en_US.UTF-8");
-    std::locale n2("en_US.UTF-8");
+    std::locale n1(LOCALE_en_US_UTF_8);
+    std::locale n2(LOCALE_en_US_UTF_8);
     std::locale noname1 = n1.combine<std::ctype<char> >(cloc);
     std::locale nonamec = noname1;
     std::locale noname2 = n1.combine<std::ctype<char> >(cloc);

Modified: libcxx/trunk/test/localization/locales/locale/locale.statics/global.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/locales/locale/locale.statics/global.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/localization/locales/locale/locale.statics/global.pass.cpp (original)
+++ libcxx/trunk/test/localization/locales/locale/locale.statics/global.pass.cpp Mon Oct  3 10:23:59 2011
@@ -14,6 +14,8 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../../platform_support.h" // locale name macros
+
 void check(const std::locale& loc)
 {
     assert(std::has_facet<std::collate<char> >(loc));
@@ -54,8 +56,8 @@
     std::locale loc;
     assert(loc.name() == "C");
     check(loc);
-    assert(std::locale::global(std::locale("en_US.UTF-8")) == loc);
+    assert(std::locale::global(std::locale(LOCALE_en_US_UTF_8)) == loc);
     std::locale loc2;
     check(loc2);
-    assert(loc2 == std::locale("en_US.UTF-8"));
+    assert(loc2 == std::locale(LOCALE_en_US_UTF_8));
 }

Added: libcxx/trunk/test/platform_support.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/platform_support.h?rev=141003&view=auto
==============================================================================
--- libcxx/trunk/test/platform_support.h (added)
+++ libcxx/trunk/test/platform_support.h Mon Oct  3 10:23:59 2011
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// Define a bunch of macros that can be used in the tests instead of
+//  implementation defined assumptions:
+//   - locale names
+//   - floating point number string output
+
+#ifndef PLATFORM_SUPPORT_H
+#define PLATFORM_SUPPORT_H
+
+// locale names
+#if _WIN32
+// WARNING: Windows does not support UTF-8 codepages.
+// Locales are "converted" using http://docs.moodle.org/dev/Table_of_locales
+#define LOCALE_en_US_UTF_8     "English_United States.1252"
+#define LOCALE_cs_CZ_ISO8859_2 "Czech_Czech Republic.1250"
+#define LOCALE_fr_FR_UTF_8     "French_France.1252"
+#define LOCALE_fr_CA_ISO8859_1 "French_Canada.1252"
+#define LOCALE_ru_RU_UTF_8     "Russian_Russia.1251"
+#define LOCALE_zh_CN_UTF_8     "Chinese_China.936"
+#else
+#define LOCALE_en_US_UTF_8     "en_US.UTF-8"
+#define LOCALE_cs_CZ_ISO8859_2 "cs_CZ.ISO8859-2"
+#define LOCALE_fr_FR_UTF_8     "fr_FR.UTF-8"
+#define LOCALE_fr_CA_ISO8859_1 "fr_CA.ISO8859-1"
+#define LOCALE_ru_RU_UTF_8     "ru_RU.UTF-8"
+#define LOCALE_zh_CN_UTF_8     "zh_CN.UTF-8"
+#endif
+
+#endif // PLATFORM_SUPPORT_H

Modified: libcxx/trunk/test/re/re.regex/re.regex.locale/imbue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/re/re.regex/re.regex.locale/imbue.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/re/re.regex/re.regex.locale/imbue.pass.cpp (original)
+++ libcxx/trunk/test/re/re.regex/re.regex.locale/imbue.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,13 +17,15 @@
 #include <locale>
 #include <cassert>
 
+#include "../../../platform_support.h" // locale name macros
+
 int main()
 {
     std::regex r;
-    std::locale loc = r.imbue(std::locale("en_US.UTF-8"));
+    std::locale loc = r.imbue(std::locale(LOCALE_en_US_UTF_8));
     assert(loc.name() == "C");
-    assert(r.getloc().name() == "en_US.UTF-8");
+    assert(r.getloc().name() == LOCALE_en_US_UTF_8);
     loc = r.imbue(std::locale("C"));
-    assert(loc.name() == "en_US.UTF-8");
+    assert(loc.name() == LOCALE_en_US_UTF_8);
     assert(r.getloc().name() == "C");
 }

Modified: libcxx/trunk/test/re/re.traits/default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/re/re.traits/default.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/re/re.traits/default.pass.cpp (original)
+++ libcxx/trunk/test/re/re.traits/default.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <regex>
 #include <cassert>
 
+#include "../../platform_support.h" // locale name macros
+
 int main()
 {
     {
@@ -26,10 +28,10 @@
         assert(t2.getloc().name() == "C");
     }
     {
-        std::locale::global(std::locale("en_US.UTF-8"));
+        std::locale::global(std::locale(LOCALE_en_US_UTF_8));
         std::regex_traits<char> t1;
-        assert(t1.getloc().name() == "en_US.UTF-8");
+        assert(t1.getloc().name() == LOCALE_en_US_UTF_8);
         std::regex_traits<wchar_t> t2;
-        assert(t2.getloc().name() == "en_US.UTF-8");
+        assert(t2.getloc().name() == LOCALE_en_US_UTF_8);
     }
 }

Modified: libcxx/trunk/test/re/re.traits/getloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/re/re.traits/getloc.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/re/re.traits/getloc.pass.cpp (original)
+++ libcxx/trunk/test/re/re.traits/getloc.pass.cpp Mon Oct  3 10:23:59 2011
@@ -16,6 +16,8 @@
 #include <regex>
 #include <cassert>
 
+#include "../../platform_support.h" // locale name macros
+
 int main()
 {
     {
@@ -25,10 +27,10 @@
         assert(t2.getloc().name() == "C");
     }
     {
-        std::locale::global(std::locale("en_US.UTF-8"));
+        std::locale::global(std::locale(LOCALE_en_US_UTF_8));
         std::regex_traits<char> t1;
-        assert(t1.getloc().name() == "en_US.UTF-8");
+        assert(t1.getloc().name() == LOCALE_en_US_UTF_8);
         std::regex_traits<wchar_t> t2;
-        assert(t2.getloc().name() == "en_US.UTF-8");
+        assert(t2.getloc().name() == LOCALE_en_US_UTF_8);
     }
 }

Modified: libcxx/trunk/test/re/re.traits/imbue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/re/re.traits/imbue.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/re/re.traits/imbue.pass.cpp (original)
+++ libcxx/trunk/test/re/re.traits/imbue.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,12 +17,14 @@
 #include <locale>
 #include <cassert>
 
+#include "../../platform_support.h" // locale name macros
+
 int main()
 {
     {
         std::regex_traits<char> t;
-        std::locale loc = t.imbue(std::locale("en_US.UTF-8"));
+        std::locale loc = t.imbue(std::locale(LOCALE_en_US_UTF_8));
         assert(loc.name() == "C");
-        assert(t.getloc().name() == "en_US.UTF-8");
+        assert(t.getloc().name() == LOCALE_en_US_UTF_8);
     }
 }

Modified: libcxx/trunk/test/re/re.traits/translate_nocase.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/re/re.traits/translate_nocase.pass.cpp?rev=141003&r1=141002&r2=141003&view=diff
==============================================================================
--- libcxx/trunk/test/re/re.traits/translate_nocase.pass.cpp (original)
+++ libcxx/trunk/test/re/re.traits/translate_nocase.pass.cpp Mon Oct  3 10:23:59 2011
@@ -17,6 +17,8 @@
 #include <regex>
 #include <cassert>
 
+#include "../../platform_support.h"
+
 int main()
 {
     {
@@ -29,7 +31,7 @@
         assert(t.translate_nocase('1') == '1');
         assert(t.translate_nocase('\xDA') == '\xDA');
         assert(t.translate_nocase('\xFA') == '\xFA');
-        t.imbue(std::locale("en_US.UTF-8"));
+        t.imbue(std::locale(LOCALE_en_US_UTF_8));
         assert(t.translate_nocase(' ') == ' ');
         assert(t.translate_nocase('A') == 'a');
         assert(t.translate_nocase('\x07') == '\x07');
@@ -49,7 +51,7 @@
         assert(t.translate_nocase(L'1') == L'1');
         assert(t.translate_nocase(L'\xDA') == L'\xDA');
         assert(t.translate_nocase(L'\xFA') == L'\xFA');
-        t.imbue(std::locale("en_US.UTF-8"));
+        t.imbue(std::locale(LOCALE_en_US_UTF_8));
         assert(t.translate_nocase(L' ') == L' ');
         assert(t.translate_nocase(L'A') == L'a');
         assert(t.translate_nocase(L'\x07') == L'\x07');





More information about the cfe-commits mailing list