diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp @@ -14,7 +14,10 @@ // ios_base::iostate& err, long double& v) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME + +// On Windows, tests for negative values are ifdeffed out, as they +// are formatted differently in the en_US locale there, as e.g. +// "($0.01)" instead of "-$0.01" #include #include @@ -75,6 +78,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -86,6 +90,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -97,6 +102,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -119,6 +125,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::string v = "$0.00"; typedef cpp17_input_iterator I; @@ -143,6 +150,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-$0.01"; typedef cpp17_input_iterator I; @@ -167,6 +175,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "$1,234,567.89"; typedef cpp17_input_iterator I; @@ -191,6 +200,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-$1,234,567.89"; std::showbase(ios); @@ -226,6 +236,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } { const my_facet f(1); @@ -241,6 +252,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -252,6 +264,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -263,6 +276,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -285,6 +299,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::string v = "USD 0.00"; typedef cpp17_input_iterator I; @@ -309,6 +324,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-USD 0.01"; typedef cpp17_input_iterator I; @@ -333,6 +349,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -357,6 +374,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-USD 1,234,567.89"; std::showbase(ios); @@ -392,6 +410,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { @@ -408,6 +427,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -419,6 +439,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -430,6 +451,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -452,6 +474,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::wstring v = L"$0.00"; typedef cpp17_input_iterator I; @@ -476,6 +499,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-$0.01"; typedef cpp17_input_iterator I; @@ -500,6 +524,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"$1,234,567.89"; typedef cpp17_input_iterator I; @@ -524,6 +549,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-$1,234,567.89"; std::showbase(ios); @@ -559,6 +585,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } { const my_facetw f(1); @@ -574,6 +601,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -585,6 +613,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -596,6 +625,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -618,6 +648,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::wstring v = L"USD 0.00"; typedef cpp17_input_iterator I; @@ -642,6 +673,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-USD 0.01"; typedef cpp17_input_iterator I; @@ -666,6 +698,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -690,6 +723,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-USD 1,234,567.89"; std::showbase(ios); @@ -725,6 +759,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS { diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp @@ -14,7 +14,10 @@ // ios_base::iostate& err, string_type& v) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME + +// On Windows, tests for negative values are ifdeffed out, as they +// are formatted differently in the en_US locale there, as e.g. +// "($0.01)" instead of "-$0.01" #include #include @@ -75,6 +78,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "0"); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -86,6 +90,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-1"); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -97,6 +102,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "123456789"); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -119,6 +125,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-123456789"); } +#endif { // zero, showbase std::string v = "$0.00"; typedef cpp17_input_iterator I; @@ -143,6 +150,7 @@ assert(ex == "0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-$0.01"; typedef cpp17_input_iterator I; @@ -167,6 +175,7 @@ assert(ex == "-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "$1,234,567.89"; typedef cpp17_input_iterator I; @@ -191,6 +200,7 @@ assert(ex == "123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-$1,234,567.89"; std::showbase(ios); @@ -228,6 +238,7 @@ assert(err == std::ios_base::failbit); assert(ex == ""); } +#endif } { const my_facet f(1); @@ -243,6 +254,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "0"); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -254,6 +266,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-1"); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -265,6 +278,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "123456789"); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -287,6 +301,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-123456789"); } +#endif { // zero, showbase std::string v = "USD 0.00"; typedef cpp17_input_iterator I; @@ -311,6 +326,7 @@ assert(ex == "0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-USD 0.01"; typedef cpp17_input_iterator I; @@ -335,6 +351,7 @@ assert(ex == "-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -359,6 +376,7 @@ assert(ex == "123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-USD 1,234,567.89"; std::showbase(ios); @@ -396,6 +414,7 @@ assert(err == std::ios_base::failbit); assert(ex == ""); } +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { @@ -412,6 +431,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"0"); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -423,6 +443,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-1"); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -434,6 +455,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"123456789"); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -456,6 +478,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-123456789"); } +#endif { // zero, showbase std::wstring v = L"$0.00"; typedef cpp17_input_iterator I; @@ -480,6 +503,7 @@ assert(ex == L"0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-$0.01"; typedef cpp17_input_iterator I; @@ -504,6 +528,7 @@ assert(ex == L"-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"$1,234,567.89"; typedef cpp17_input_iterator I; @@ -528,6 +553,7 @@ assert(ex == L"123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-$1,234,567.89"; std::showbase(ios); @@ -565,6 +591,7 @@ assert(err == std::ios_base::failbit); assert(ex == L""); } +#endif } { const my_facetw f(1); @@ -580,6 +607,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"0"); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -591,6 +619,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-1"); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -602,6 +631,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"123456789"); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -624,6 +654,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-123456789"); } +#endif { // zero, showbase std::wstring v = L"USD 0.00"; typedef cpp17_input_iterator I; @@ -648,6 +679,7 @@ assert(ex == L"0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-USD 0.01"; typedef cpp17_input_iterator I; @@ -672,6 +704,7 @@ assert(ex == L"-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -696,6 +729,7 @@ assert(ex == L"123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-USD 1,234,567.89"; std::showbase(ios); @@ -733,6 +767,7 @@ assert(err == std::ios_base::failbit); assert(ex == L""); } +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS {