diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp @@ -35,19 +35,6 @@ #include "platform_support.h" // locale name macros -// TODO: -// Some of the assertions in this test are failing on Apple platforms. -// Until we figure out the problem and fix it, disable these tests on -// Apple platforms. Note that we're not using XFAIL or UNSUPPORTED markup -// here, because this test would otherwise be disabled on all platforms -// we test. To avoid this test becoming entirely stale, we just disable -// the parts that fail. -// -// See https://llvm.org/PR45739 for the bug tracking this. -#if defined(__APPLE__) -# define APPLE_FIXME -#endif - typedef std::money_get > Fn; class my_facet @@ -228,7 +215,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "-1 234 567,89 RUB "; + std::string v = "-1 234 567,89 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -240,7 +227,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "-1 234 567,89 RUB "; + std::string v = "-1 234 567,89 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -310,7 +297,7 @@ assert(ex == -123456789); } { // zero, showbase - std::string v = "0,00 RUB "; + std::string v = "0,00 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -320,9 +307,8 @@ assert(err == std::ios_base::goodbit); assert(ex == 0); } -#if !defined(APPLE_FIXME) { // zero, showbase - std::string v = "0,00 RUB "; + std::string v = "0,00 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -334,9 +320,8 @@ assert(ex == 0); std::noshowbase(ios); } -#endif { // negative one, showbase - std::string v = "-0,01 RUB "; + std::string v = "-0,01 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -346,9 +331,8 @@ assert(err == std::ios_base::goodbit); assert(ex == -1); } -#if !defined(APPLE_FIXME) { // negative one, showbase - std::string v = "-0,01 RUB "; + std::string v = "-0,01 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -360,9 +344,8 @@ assert(ex == -1); std::noshowbase(ios); } -#endif { // positive, showbase - std::string v = "1 234 567,89 RUB "; + std::string v = "1 234 567,89 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -372,9 +355,8 @@ assert(err == std::ios_base::goodbit); assert(ex == 123456789); } -#if !defined(APPLE_FIXME) { // positive, showbase - std::string v = "1 234 567,89 RUB "; + std::string v = "1 234 567,89 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -386,10 +368,8 @@ assert(ex == 123456789); std::noshowbase(ios); } -#endif -#if !defined(APPLE_FIXME) { // negative, showbase - std::string v = "-1 234 567,89 RUB "; + std::string v = "-1 234 567,89 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -401,7 +381,6 @@ assert(ex == -123456789); std::noshowbase(ios); } -#endif { // negative, showbase std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; std::showbase(ios); @@ -571,7 +550,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 RUB "; + std::wstring v = L"-1 234 567,89 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -583,7 +562,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 RUB "; + std::wstring v = L"-1 234 567,89 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -653,7 +632,7 @@ assert(ex == -123456789); } { // zero, showbase - std::wstring v = L"0,00 RUB "; + std::wstring v = L"0,00 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -663,9 +642,8 @@ assert(err == std::ios_base::goodbit); assert(ex == 0); } -#if !defined(APPLE_FIXME) { // zero, showbase - std::wstring v = L"0,00 RUB "; + std::wstring v = L"0,00 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -677,9 +655,8 @@ assert(ex == 0); std::noshowbase(ios); } -#endif { // negative one, showbase - std::wstring v = L"-0,01 RUB "; + std::wstring v = L"-0,01 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -689,9 +666,8 @@ assert(err == std::ios_base::goodbit); assert(ex == -1); } -#if !defined(APPLE_FIXME) { // negative one, showbase - std::wstring v = L"-0,01 RUB "; + std::wstring v = L"-0,01 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -703,9 +679,8 @@ assert(ex == -1); std::noshowbase(ios); } -#endif { // positive, showbase - std::wstring v = L"1 234 567,89 RUB "; + std::wstring v = L"1 234 567,89 RUB"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -715,9 +690,8 @@ assert(err == std::ios_base::goodbit); assert(ex == 123456789); } -#if !defined(APPLE_FIXME) { // positive, showbase - std::wstring v = L"1 234 567,89 RUB "; + std::wstring v = L"1 234 567,89 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -729,10 +703,8 @@ assert(ex == 123456789); std::noshowbase(ios); } -#endif -#if !defined(APPLE_FIXME) { // negative, showbase - std::wstring v = L"-1 234 567,89 RUB "; + std::wstring v = L"-1 234 567,89 RUB"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -744,7 +716,6 @@ assert(ex == -123456789); std::noshowbase(ios); } -#endif { // negative, showbase std::wstring v = L"-1 234 567,89 \x440\x443\x431""."; std::showbase(ios); diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp @@ -35,19 +35,6 @@ #include "platform_support.h" // locale name macros -// TODO: -// Some of the assertions in this test are failing on Apple platforms. -// Until we figure out the problem and fix it, disable these tests on -// Apple platforms. Note that we're not using XFAIL or UNSUPPORTED markup -// here, because this test would otherwise be disabled on all platforms -// we test. To avoid this test becoming entirely stale, we just disable -// the parts that fail. -// -// See https://llvm.org/PR45739 for the bug tracking this. -#if defined(__APPLE__) -# define APPLE_FIXME -#endif - typedef std::money_put > Fn; class my_facet @@ -87,36 +74,34 @@ { const my_facet f(1); // char, national -#if !defined(APPLE_FIXME) { // zero long double v = 0; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "0,00 "); + assert(ex == "0,00"); } { // negative one long double v = -1; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-0,01 "); + assert(ex == "-0,01"); } { // positive long double v = 123456789; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 "); + assert(ex == "1 234 567,89"); } { // negative long double v = -123456789; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 "); + assert(ex == "-1 234 567,89"); } -#endif // APPLE_FIXME { // zero, showbase long double v = 0; std::showbase(ios); @@ -186,34 +171,33 @@ // char, international std::noshowbase(ios); ios.unsetf(std::ios_base::adjustfield); -#if !defined(APPLE_FIXME) { // zero long double v = 0; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "0,00 "); + assert(ex == "0,00"); } { // negative one long double v = -1; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-0,01 "); + assert(ex == "-0,01"); } { // positive long double v = 123456789; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 "); + assert(ex == "1 234 567,89"); } { // negative long double v = -123456789; char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 "); + assert(ex == "-1 234 567,89"); } { // zero, showbase long double v = 0; @@ -221,7 +205,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "0,00 RUB "); + assert(ex == "0,00 RUB"); } { // negative one, showbase long double v = -1; @@ -229,7 +213,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-0,01 RUB "); + assert(ex == "-0,01 RUB"); } { // positive, showbase long double v = 123456789; @@ -237,7 +221,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 RUB "); + assert(ex == "1 234 567,89 RUB"); } { // negative, showbase long double v = -123456789; @@ -245,9 +229,8 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 RUB "); + assert(ex == "-1 234 567,89 RUB"); } -#endif // APPLE_FIXME { // negative, showbase, left long double v = -123456789; std::showbase(ios); @@ -259,7 +242,6 @@ assert(ex == "-1 234 567,89 RUB "); assert(ios.width() == 0); } -#if !defined(APPLE_FIXME) { // negative, showbase, internal long double v = -123456789; std::showbase(ios); @@ -268,7 +250,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 RUB "); + assert(ex == "-1 234 567,89 RUB"); assert(ios.width() == 0); } { // negative, showbase, right @@ -279,10 +261,9 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == " -1 234 567,89 RUB "); + assert(ex == " -1 234 567,89 RUB"); assert(ios.width() == 0); } -#endif // APPLE_FIXME } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { @@ -290,36 +271,34 @@ // wchar_t, national std::noshowbase(ios); ios.unsetf(std::ios_base::adjustfield); -#if !defined(APPLE_FIXME) { // zero long double v = 0; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"0,00 "); + assert(ex == L"0,00"); } { // negative one long double v = -1; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 "); + assert(ex == L"-0,01"); } { // positive long double v = 123456789; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 "); + assert(ex == L"1 234 567,89"); } { // negative long double v = -123456789; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 "); + assert(ex == L"-1 234 567,89"); } -#endif // APPLE_FIXME { // zero, showbase long double v = 0; std::showbase(ios); @@ -389,34 +368,33 @@ // wchar_t, international std::noshowbase(ios); ios.unsetf(std::ios_base::adjustfield); -#if !defined(APPLE_FIXME) { // zero long double v = 0; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"0,00 "); + assert(ex == L"0,00"); } { // negative one long double v = -1; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 "); + assert(ex == L"-0,01"); } { // positive long double v = 123456789; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 "); + assert(ex == L"1 234 567,89"); } { // negative long double v = -123456789; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 "); + assert(ex == L"-1 234 567,89"); } { // zero, showbase long double v = 0; @@ -424,7 +402,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"0,00 RUB "); + assert(ex == L"0,00 RUB"); } { // negative one, showbase long double v = -1; @@ -432,7 +410,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 RUB "); + assert(ex == L"-0,01 RUB"); } { // positive, showbase long double v = 123456789; @@ -440,7 +418,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 RUB "); + assert(ex == L"1 234 567,89 RUB"); } { // negative, showbase long double v = -123456789; @@ -448,9 +426,8 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUB "); + assert(ex == L"-1 234 567,89 RUB"); } -#endif // APPLE_FIXME { // negative, showbase, left long double v = -123456789; std::showbase(ios); @@ -462,7 +439,6 @@ assert(ex == L"-1 234 567,89 RUB "); assert(ios.width() == 0); } -#if !defined(APPLE_FIXME) { // negative, showbase, internal long double v = -123456789; std::showbase(ios); @@ -471,7 +447,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUB "); + assert(ex == L"-1 234 567,89 RUB"); assert(ios.width() == 0); } { // negative, showbase, right @@ -482,10 +458,9 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L" -1 234 567,89 RUB "); + assert(ex == L" -1 234 567,89 RUB"); assert(ios.width() == 0); } -#endif // APPLE_FIXME } #endif // TEST_HAS_NO_WIDE_CHARACTERS