[libcxx] r232365 - Don't hardcode the locale name string.

Ed Schouten ed at nuxi.nl
Mon Mar 16 02:44:38 PDT 2015


Author: ed
Date: Mon Mar 16 04:44:37 2015
New Revision: 232365

URL: http://llvm.org/viewvc/llvm-project?rev=232365&view=rev
Log:
Don't hardcode the locale name string.

The rest of the test uses the #defines for the locale names properly. In
this single spot we do hardcode the string. This causes this test to
fail on CloudABI, where this locale is called en_US.UTF-8 at UTC.

Modified:
    libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp

Modified: libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp?rev=232365&r1=232364&r2=232365&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp Mon Mar 16 04:44:37 2015
@@ -45,7 +45,8 @@ int main()
     {
         test<char> t;
         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.pubimbue(std::locale(LOCALE_fr_FR_UTF_8)).name() ==
+               LOCALE_en_US_UTF_8);
         assert(t.getloc().name() == LOCALE_fr_FR_UTF_8);
     }
 }





More information about the cfe-commits mailing list