diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp @@ -11,8 +11,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME - // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_FR.UTF-8 // REQUIRES: locale.ru_RU.UTF-8 @@ -86,22 +84,32 @@ } #endif +#ifdef _WIN32 + std::string curr_space = ""; +#else + std::string curr_space = " "; +#endif { Fnf f(LOCALE_en_US_UTF_8, 1); assert(f.curr_symbol() == "$"); } { Fnt f(LOCALE_en_US_UTF_8, 1); - assert(f.curr_symbol() == "USD "); + assert(f.curr_symbol() == "USD" + curr_space); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS +#ifdef _WIN32 + std::wstring w_curr_space = L""; +#else + std::wstring w_curr_space = L" "; +#endif { Fwf f(LOCALE_en_US_UTF_8, 1); assert(f.curr_symbol() == L"$"); } { Fwt f(LOCALE_en_US_UTF_8, 1); - assert(f.curr_symbol() == L"USD "); + assert(f.curr_symbol() == L"USD" + w_curr_space); } #endif @@ -134,6 +142,8 @@ assert(f.curr_symbol() == " \u20BD"); else assert(f.curr_symbol() == " \xD1\x80\xD1\x83\xD0\xB1"); +#elif defined(_WIN32) + assert(f.curr_symbol() == " \u20BD"); #else assert(f.curr_symbol() == " \xD1\x80\xD1\x83\xD0\xB1"); #endif @@ -150,6 +160,8 @@ assert(f.curr_symbol() == L" \u20BD"); else assert(f.curr_symbol() == L" \x440\x443\x431"); +#elif defined(_WIN32) + assert(f.curr_symbol() == L" \u20BD"); #else assert(f.curr_symbol() == L" \x440\x443\x431"); #endif @@ -163,20 +175,28 @@ { Fnf f(LOCALE_zh_CN_UTF_8, 1); +#ifdef _WIN32 + assert(f.curr_symbol() == "\xC2\xA5"); +#else assert(f.curr_symbol() == "\xEF\xBF\xA5"); +#endif } { Fnt f(LOCALE_zh_CN_UTF_8, 1); - assert(f.curr_symbol() == "CNY "); + assert(f.curr_symbol() == "CNY" + curr_space); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_zh_CN_UTF_8, 1); +#ifdef _WIN32 + assert(f.curr_symbol() == L"\x00A5"); +#else assert(f.curr_symbol() == L"\xFFE5"); +#endif } { Fwt f(LOCALE_zh_CN_UTF_8, 1); - assert(f.curr_symbol() == L"CNY "); + assert(f.curr_symbol() == L"CNY" + w_curr_space); } #endif // TEST_HAS_NO_WIDE_CHARACTERS