diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-06-08 18:22:03 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-06-08 18:22:03 +0000 |
commit | ba8754ab09897da0f1d11c0dcdddefb990d9853f (patch) | |
tree | 9fa2420fc3de0b98283bfde3f250db94abee7f33 /libcxx/test/std/localization | |
parent | 2bd63dae21a25cc7ffdf004cc3b1a1995d6b6659 (diff) | |
download | bcm5719-llvm-ba8754ab09897da0f1d11c0dcdddefb990d9853f.tar.gz bcm5719-llvm-ba8754ab09897da0f1d11c0dcdddefb990d9853f.zip |
[libcxx] [test] Update locale names for Windows.
locale.codecvt.byname/ctor_char.pass.cpp:
This test used to use "en_US" as a plain string instead of using platform_support.
Need to fix this because MS STL expects "en-US" instead.
platform_support.h:
These are the legacy Windows locale names. Should use IETF tags instead.
I've also added en_US, since a test was using that as a locale string as well.
msvc_stdlib_force_include.hpp:
Remove _MSVC_STL_VER. The libraries will directly define _MSVC_STL_VERSION in the future.
Fixes D29351.
llvm-svn: 305000
Diffstat (limited to 'libcxx/test/std/localization')
-rw-r--r-- | libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp index 349577835ec..24c2f23f0db 100644 --- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp @@ -17,6 +17,8 @@ #include <locale> #include <cassert> +#include "platform_support.h" + typedef std::codecvt_byname<char, char, std::mbstate_t> F; class my_facet @@ -38,12 +40,12 @@ int my_facet::count = 0; int main() { { - std::locale l(std::locale::classic(), new my_facet("en_US")); + std::locale l(std::locale::classic(), new my_facet(LOCALE_en_US)); assert(my_facet::count == 1); } assert(my_facet::count == 0); { - my_facet f("en_US", 1); + my_facet f(LOCALE_en_US, 1); assert(my_facet::count == 1); { std::locale l(std::locale::classic(), &f); @@ -53,12 +55,12 @@ int main() } assert(my_facet::count == 0); { - std::locale l(std::locale::classic(), new my_facet(std::string("en_US"))); + std::locale l(std::locale::classic(), new my_facet(std::string(LOCALE_en_US))); assert(my_facet::count == 1); } assert(my_facet::count == 0); { - my_facet f(std::string("en_US"), 1); + my_facet f(std::string(LOCALE_en_US), 1); assert(my_facet::count == 1); { std::locale l(std::locale::classic(), &f); |