diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp @@ -6,13 +6,9 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: darwin -// // 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 @@ -140,35 +136,63 @@ { Fnf f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::value); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::symbol); +#endif } { Fnt f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::value); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::symbol); +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::value); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::symbol); +#endif } { Fwt f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::value); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::symbol); +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS @@ -218,10 +242,17 @@ { Fnt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#if defined(_WIN32) || defined(__APPLE__) + assert(p.field[0] == std::money_base::symbol); + assert(p.field[1] == std::money_base::sign); + assert(p.field[2] == std::money_base::none); + assert(p.field[3] == std::money_base::value); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::symbol); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { @@ -235,10 +266,17 @@ { Fwt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#if defined(_WIN32) || defined(__APPLE__) + assert(p.field[0] == std::money_base::symbol); + assert(p.field[1] == std::money_base::sign); + assert(p.field[2] == std::money_base::none); + assert(p.field[3] == std::money_base::value); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::symbol); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp @@ -6,13 +6,9 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: darwin -// // 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 @@ -210,35 +206,63 @@ { Fnf f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::sign); + assert(p.field[1] == std::money_base::symbol); + assert(p.field[2] == std::money_base::none); + assert(p.field[3] == std::money_base::value); +#else assert(p.field[0] == std::money_base::symbol); assert(p.field[1] == std::money_base::sign); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); +#endif } { Fnt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef _WIN32 + assert(p.field[0] == std::money_base::symbol); + assert(p.field[1] == std::money_base::sign); + assert(p.field[2] == std::money_base::none); + assert(p.field[3] == std::money_base::value); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::symbol); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::sign); + assert(p.field[1] == std::money_base::symbol); + assert(p.field[2] == std::money_base::none); + assert(p.field[3] == std::money_base::value); +#else assert(p.field[0] == std::money_base::symbol); assert(p.field[1] == std::money_base::sign); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); +#endif } { Fwt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef _WIN32 + assert(p.field[0] == std::money_base::symbol); + assert(p.field[1] == std::money_base::sign); + assert(p.field[2] == std::money_base::none); + assert(p.field[3] == std::money_base::value); +#else assert(p.field[0] == std::money_base::sign); assert(p.field[1] == std::money_base::symbol); assert(p.field[2] == std::money_base::none); assert(p.field[3] == std::money_base::value); +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS