[libcxx-commits] [libcxx] 5b97aa1 - [libc++] Re-disable parts of the failing RU locale tests on Apple

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 29 09:51:10 PDT 2020


Author: Louis Dionne
Date: 2020-04-29T12:50:58-04:00
New Revision: 5b97aa14f4289dec23a071f8f2199acfd82b4b23

URL: https://github.com/llvm/llvm-project/commit/5b97aa14f4289dec23a071f8f2199acfd82b4b23
DIFF: https://github.com/llvm/llvm-project/commit/5b97aa14f4289dec23a071f8f2199acfd82b4b23.diff

LOG: [libc++] Re-disable parts of the failing RU locale tests on Apple

Instead of completely disabling the tests on Apple, which makes them
disabled on all platforms we test (and hence useless), this commit
disables only the assertions that actually fail. I also created a
bug report to track re-enabling them (https://llvm.org/PR45739).

Added: 
    

Modified: 
    libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
    libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp

Removed: 
    


################################################################################
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
index f9b52aa89b09..2f734284a905 100644
--- 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
@@ -33,6 +33,19 @@
 
 #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<char, input_iterator<const char*> > Fn;
 
 class my_facet
@@ -301,6 +314,7 @@ int main(int, char**)
             assert(err == std::ios_base::goodbit);
             assert(ex == 0);
         }
+#if !defined(APPLE_FIXME)
         {   // zero, showbase
             std::string v = "0,00 RUB ";
             showbase(ios);
@@ -314,6 +328,7 @@ int main(int, char**)
             assert(ex == 0);
             noshowbase(ios);
         }
+#endif
         {   // negative one, showbase
             std::string v = "-0,01 RUB ";
             typedef input_iterator<const char*> I;
@@ -325,6 +340,7 @@ int main(int, char**)
             assert(err == std::ios_base::goodbit);
             assert(ex == -1);
         }
+#if !defined(APPLE_FIXME)
         {   // negative one, showbase
             std::string v = "-0,01 RUB ";
             showbase(ios);
@@ -338,6 +354,7 @@ int main(int, char**)
             assert(ex == -1);
             noshowbase(ios);
         }
+#endif
         {   // positive, showbase
             std::string v = "1 234 567,89 RUB ";
             typedef input_iterator<const char*> I;
@@ -349,6 +366,7 @@ int main(int, char**)
             assert(err == std::ios_base::goodbit);
             assert(ex == 123456789);
         }
+#if !defined(APPLE_FIXME)
         {   // positive, showbase
             std::string v = "1 234 567,89 RUB ";
             showbase(ios);
@@ -362,6 +380,8 @@ int main(int, char**)
             assert(ex == 123456789);
             noshowbase(ios);
         }
+#endif
+#if !defined(APPLE_FIXME)
         {   // negative, showbase
             std::string v = "-1 234 567,89 RUB ";
             showbase(ios);
@@ -375,6 +395,7 @@ int main(int, char**)
             assert(ex == -123456789);
             noshowbase(ios);
         }
+#endif
         {   // negative, showbase
             std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1"".";
             showbase(ios);
@@ -635,6 +656,7 @@ int main(int, char**)
             assert(err == std::ios_base::goodbit);
             assert(ex == 0);
         }
+#if !defined(APPLE_FIXME)
         {   // zero, showbase
             std::wstring v = L"0,00 RUB ";
             showbase(ios);
@@ -648,6 +670,7 @@ int main(int, char**)
             assert(ex == 0);
             noshowbase(ios);
         }
+#endif
         {   // negative one, showbase
             std::wstring v = L"-0,01 RUB ";
             typedef input_iterator<const wchar_t*> I;
@@ -659,6 +682,7 @@ int main(int, char**)
             assert(err == std::ios_base::goodbit);
             assert(ex == -1);
         }
+#if !defined(APPLE_FIXME)
         {   // negative one, showbase
             std::wstring v = L"-0,01 RUB ";
             showbase(ios);
@@ -672,6 +696,7 @@ int main(int, char**)
             assert(ex == -1);
             noshowbase(ios);
         }
+#endif
         {   // positive, showbase
             std::wstring v = L"1 234 567,89 RUB ";
             typedef input_iterator<const wchar_t*> I;
@@ -683,6 +708,7 @@ int main(int, char**)
             assert(err == std::ios_base::goodbit);
             assert(ex == 123456789);
         }
+#if !defined(APPLE_FIXME)
         {   // positive, showbase
             std::wstring v = L"1 234 567,89 RUB ";
             showbase(ios);
@@ -696,6 +722,8 @@ int main(int, char**)
             assert(ex == 123456789);
             noshowbase(ios);
         }
+#endif
+#if !defined(APPLE_FIXME)
         {   // negative, showbase
             std::wstring v = L"-1 234 567,89 RUB ";
             showbase(ios);
@@ -709,6 +737,7 @@ int main(int, char**)
             assert(ex == -123456789);
             noshowbase(ios);
         }
+#endif
         {   // negative, showbase
             std::wstring v = L"-1 234 567,89 \x440\x443\x431"".";
             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
index c2b5840c849b..2b82d61139c8 100644
--- 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
@@ -33,6 +33,19 @@
 
 #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<char, output_iterator<char*> > Fn;
 
 class my_facet
@@ -68,6 +81,7 @@ int main(int, char**)
 {
     const my_facet f(1);
     // char, national
+#if !defined(APPLE_FIXME)
     {   // zero
         long double v = 0;
         char str[100];
@@ -100,6 +114,7 @@ int main(int, char**)
         std::string ex(str, iter.base());
         assert(ex == "-1 234 567,89 ");
     }
+#endif
     {   // zero, showbase
         long double v = 0;
         showbase(ios);
@@ -176,6 +191,7 @@ int main(int, char**)
     // char, international
     noshowbase(ios);
     ios.unsetf(std::ios_base::adjustfield);
+#if !defined(APPLE_FIXME)
     {   // zero
         long double v = 0;
         char str[100];
@@ -244,6 +260,7 @@ int main(int, char**)
         std::string ex(str, iter.base());
         assert(ex == "-1 234 567,89 RUB ");
     }
+#endif
     {   // negative, showbase, left
         long double v = -123456789;
         showbase(ios);
@@ -256,6 +273,7 @@ int main(int, char**)
         assert(ex == "-1 234 567,89 RUB   ");
         assert(ios.width() == 0);
     }
+#if !defined(APPLE_FIXME)
     {   // negative, showbase, internal
         long double v = -123456789;
         showbase(ios);
@@ -280,12 +298,14 @@ int main(int, char**)
         assert(ex == "  -1 234 567,89 RUB ");
         assert(ios.width() == 0);
     }
+#endif
 }
 {
     const my_facetw f(1);
     // wchar_t, national
     noshowbase(ios);
     ios.unsetf(std::ios_base::adjustfield);
+#if !defined(APPLE_FIXME)
     {   // zero
         long double v = 0;
         wchar_t str[100];
@@ -318,6 +338,7 @@ int main(int, char**)
         std::wstring ex(str, iter.base());
         assert(ex == L"-1 234 567,89 ");
     }
+#endif
     {   // zero, showbase
         long double v = 0;
         showbase(ios);
@@ -394,6 +415,7 @@ int main(int, char**)
     // wchar_t, international
     noshowbase(ios);
     ios.unsetf(std::ios_base::adjustfield);
+#if !defined(APPLE_FIXME)
     {   // zero
         long double v = 0;
         wchar_t str[100];
@@ -462,6 +484,7 @@ int main(int, char**)
         std::wstring ex(str, iter.base());
         assert(ex == L"-1 234 567,89 RUB ");
     }
+#endif
     {   // negative, showbase, left
         long double v = -123456789;
         showbase(ios);
@@ -474,6 +497,7 @@ int main(int, char**)
         assert(ex == L"-1 234 567,89 RUB   ");
         assert(ios.width() == 0);
     }
+#if !defined(APPLE_FIXME)
     {   // negative, showbase, internal
         long double v = -123456789;
         showbase(ios);
@@ -498,6 +522,7 @@ int main(int, char**)
         assert(ex == L"  -1 234 567,89 RUB ");
         assert(ios.width() == 0);
     }
+#endif
 }
 
   return 0;


        


More information about the libcxx-commits mailing list