[cfe-commits] [libcxx] r140247 - in /libcxx/trunk/test/input.output/iostreams.base/ios/basic.ios.members: copyfmt.pass.cpp imbue.pass.cpp move.pass.cpp swap.pass.cpp

David Chisnall csdavec at swan.ac.uk
Wed Sep 21 05:09:18 PDT 2011


Author: theraven
Date: Wed Sep 21 07:09:17 2011
New Revision: 140247

URL: http://llvm.org/viewvc/llvm-project?rev=140247&view=rev
Log:
More locale cleanups.  Fully specify locales in iostream tests.

Modified:
    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

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=140247&r1=140246&r2=140247&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 Wed Sep 21 07:09:17 2011
@@ -38,7 +38,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert(!g3_called);
-        assert(stream.getloc().name() == "en_US");
+        assert(stream.getloc().name() == "en_US.UTF-8");
         assert(index == 4);
         f1_called = true;
     }
@@ -53,7 +53,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert(!g3_called);
-        assert(stream.getloc().name() == "en_US");
+        assert(stream.getloc().name() == "en_US.UTF-8");
         assert(index == 5);
         f2_called = true;
     }
@@ -68,7 +68,7 @@
         assert(!g1_called);
         assert( g2_called);
         assert( g3_called);
-        assert(stream.getloc().name() == "fr_FR");
+        assert(stream.getloc().name() == "fr_FR.UTF-8");
         assert(index == 7);
         g1_called = true;
     }
@@ -83,7 +83,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert( g3_called);
-        assert(stream.getloc().name() == "fr_FR");
+        assert(stream.getloc().name() == "fr_FR.UTF-8");
         assert(index == 8);
         g2_called = true;
     }
@@ -98,7 +98,7 @@
         assert(!g1_called);
         assert(!g2_called);
         assert(!g3_called);
-        assert(stream.getloc().name() == "fr_FR");
+        assert(stream.getloc().name() == "fr_FR.UTF-8");
         assert(index == 9);
         g3_called = true;
     }
@@ -111,7 +111,7 @@
     ios1.flags(std::ios::boolalpha | std::ios::dec | std::ios::fixed);
     ios1.precision(1);
     ios1.width(11);
-    ios1.imbue(std::locale("en_US"));
+    ios1.imbue(std::locale("en_US.UTF-8"));
     ios1.exceptions(std::ios::failbit);
     ios1.setstate(std::ios::eofbit);
     ios1.register_callback(f1, 4);
@@ -131,7 +131,7 @@
     ios2.flags(std::ios::showpoint | std::ios::uppercase);
     ios2.precision(2);
     ios2.width(12);
-    ios2.imbue(std::locale("fr_FR"));
+    ios2.imbue(std::locale("fr_FR.UTF-8"));
     ios2.exceptions(std::ios::eofbit);
     ios2.setstate(std::ios::goodbit);
     ios2.register_callback(g1, 7);
@@ -165,7 +165,7 @@
     assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
     assert(ios1.precision() == 2);
     assert(ios1.width() == 12);
-    assert(ios1.getloc().name() == "fr_FR");
+    assert(ios1.getloc().name() == "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=140247&r1=140246&r2=140247&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 Wed Sep 21 07:09:17 2011
@@ -33,7 +33,7 @@
         assert(!f1_called);
         assert( f2_called);
         assert( f3_called);
-        assert(stream.getloc().name() == "en_US");
+        assert(stream.getloc().name() == "en_US.UTF-8");
         assert(index == 4);
         f1_called = true;
     }
@@ -46,7 +46,7 @@
         assert(!f1_called);
         assert(!f2_called);
         assert( f3_called);
-        assert(stream.getloc().name() == "en_US");
+        assert(stream.getloc().name() == "en_US.UTF-8");
         assert(index == 5);
         f2_called = true;
     }
@@ -59,7 +59,7 @@
         assert(!f1_called);
         assert(!f2_called);
         assert(!f3_called);
-        assert(stream.getloc().name() == "en_US");
+        assert(stream.getloc().name() == "en_US.UTF-8");
         assert(index == 6);
         f3_called = true;
     }
@@ -72,9 +72,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"));
+        std::locale l = ios.imbue(std::locale("en_US.UTF-8"));
         assert(l.name() == std::string("C"));
-        assert(ios.getloc().name() == std::string("en_US"));
+        assert(ios.getloc().name() == std::string("en_US.UTF-8"));
         assert(f1_called);
         assert(f2_called);
         assert(f3_called);
@@ -88,10 +88,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"));
+        std::locale l = ios.imbue(std::locale("en_US.UTF-8"));
         assert(l.name() == std::string("C"));
-        assert(ios.getloc().name() == std::string("en_US"));
-        assert(sb.getloc().name() == std::string("en_US"));
+        assert(ios.getloc().name() == std::string("en_US.UTF-8"));
+        assert(sb.getloc().name() == std::string("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=140247&r1=140246&r2=140247&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 Wed Sep 21 07:09:17 2011
@@ -82,7 +82,7 @@
     ios2.flags(std::ios::showpoint | std::ios::uppercase);
     ios2.precision(2);
     ios2.width(12);
-    ios2.imbue(std::locale("fr_FR"));
+    ios2.imbue(std::locale("fr_FR.UTF-8"));
     ios2.exceptions(std::ios::eofbit);
     ios2.setstate(std::ios::goodbit);
     ios2.register_callback(g1, 7);
@@ -107,7 +107,7 @@
     assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
     assert(ios1.precision() == 2);
     assert(ios1.width() == 12);
-    assert(ios1.getloc().name() == "fr_FR");
+    assert(ios1.getloc().name() == "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=140247&r1=140246&r2=140247&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 Wed Sep 21 07:09:17 2011
@@ -73,7 +73,7 @@
     ios1.flags(std::ios::boolalpha | std::ios::dec | std::ios::fixed);
     ios1.precision(1);
     ios1.width(11);
-    ios1.imbue(std::locale("en_US"));
+    ios1.imbue(std::locale("en_US.UTF-8"));
     ios1.exceptions(std::ios::failbit);
     ios1.setstate(std::ios::eofbit);
     ios1.register_callback(f1, 4);
@@ -93,7 +93,7 @@
     ios2.flags(std::ios::showpoint | std::ios::uppercase);
     ios2.precision(2);
     ios2.width(12);
-    ios2.imbue(std::locale("fr_FR"));
+    ios2.imbue(std::locale("fr_FR.UTF-8"));
     ios2.exceptions(std::ios::eofbit);
     ios2.setstate(std::ios::goodbit);
     ios2.register_callback(g1, 7);
@@ -118,7 +118,7 @@
     assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
     assert(ios1.precision() == 2);
     assert(ios1.width() == 12);
-    assert(ios1.getloc().name() == "fr_FR");
+    assert(ios1.getloc().name() == "fr_FR.UTF-8");
     assert(ios1.exceptions() == std::ios::eofbit);
     assert(!f1_called);
     assert(!f2_called);
@@ -147,7 +147,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");
+    assert(ios2.getloc().name() == "en_US.UTF-8");
     assert(ios2.exceptions() == std::ios::failbit);
     assert(ios2.iword(0) == 1);
     assert(ios2.iword(1) == 2);





More information about the cfe-commits mailing list