summaryrefslogtreecommitdiffstats
path: root/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp')
-rw-r--r--libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp
index eb508f044b8..66bf829775b 100644
--- a/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp
+++ b/libcxx/test/input.output/iostreams.base/ios.base/ios.base.locales/imbue.pass.cpp
@@ -18,6 +18,8 @@
#include <locale>
#include <cassert>
+#include "../../../../platform_support.h" // locale name macros
+
class test
: public std::ios
{
@@ -39,7 +41,7 @@ void f1(std::ios_base::event ev, std::ios_base& stream, int index)
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 @@ void f2(std::ios_base::event ev, std::ios_base& stream, int index)
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 @@ void f3(std::ios_base::event ev, std::ios_base& stream, int index)
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 @@ int main()
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);
OpenPOWER on IntegriCloud