[libcxx-commits] [libcxx] d819703 - [libc++][test] Disable parts requiring locales.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 22 07:51:23 PST 2023


Author: Mark de Wever
Date: 2023-01-22T16:51:13+01:00
New Revision: d819703410c2362cbafb60117dab45b182d8b13d

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

LOG: [libc++][test] Disable parts requiring locales.

This part should be guarded, but there are no proper guards yet.
Therefore disable the offending part. This was reported post commit in
D140653.

Added: 
    

Modified: 
    libcxx/test/std/containers/container.adaptors/container.adaptors.format/format.functions.tests.h
    libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.functions.tests.h
    libcxx/test/std/utilities/format/format.range/format.range.formatter/format.functions.tests.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/containers/container.adaptors/container.adaptors.format/format.functions.tests.h b/libcxx/test/std/containers/container.adaptors/container.adaptors.format/format.functions.tests.h
index cae566d9aecf..489de3a74096 100644
--- a/libcxx/test/std/containers/container.adaptors/container.adaptors.format/format.functions.tests.h
+++ b/libcxx/test/std/containers/container.adaptors/container.adaptors.format/format.functions.tests.h
@@ -600,6 +600,8 @@ void test_floating_point(TestFunction check, ExceptionTest check_exception, auto
   // *** locale-specific form ***
   check(SV("[-42.5, 0, 1.25, 42.5]"), SV("{::L}"), input); // does not require locales present
 #ifndef TEST_HAS_NO_LOCALIZATION
+// TODO FMT Enable with locale testing active
+#  if 0
   std::locale::global(std::locale(LOCALE_fr_FR_UTF_8));
   check(SV("[-42,5, 0, 1,25, 42,5]"), SV("{::L}"), input);
 
@@ -607,6 +609,7 @@ void test_floating_point(TestFunction check, ExceptionTest check_exception, auto
   check(SV("[-42.5, 0, 1.25, 42.5]"), SV("{::L}"), input);
 
   std::locale::global(std::locale::classic());
+#  endif
 #endif // TEST_HAS_NO_LOCALIZATION
 
   // *** type ***

diff  --git a/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.functions.tests.h b/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.functions.tests.h
index 7bb65636e243..a884ba7ec858 100644
--- a/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.functions.tests.h
+++ b/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.functions.tests.h
@@ -776,6 +776,8 @@ void test_floating_point(TestFunction check, ExceptionTest check_exception, auto
   // *** locale-specific form ***
   check(SV("{-42.5, 0, 1.25, 42.5}"), SV("{::L}"), input); // does not require locales present
 #ifndef TEST_HAS_NO_LOCALIZATION
+// TODO FMT Enable with locale testing active
+#  if 0
   std::locale::global(std::locale(LOCALE_fr_FR_UTF_8));
   check(SV("{-42,5, 0, 1,25, 42,5}"), SV("{::L}"), input);
 
@@ -783,6 +785,7 @@ void test_floating_point(TestFunction check, ExceptionTest check_exception, auto
   check(SV("{-42.5, 0, 1.25, 42.5}"), SV("{::L}"), input);
 
   std::locale::global(std::locale::classic());
+#  endif
 #endif // TEST_HAS_NO_LOCALIZATION
 
   // *** type ***

diff  --git a/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.functions.tests.h b/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.functions.tests.h
index b2627d596fe2..890f597bdeae 100644
--- a/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.functions.tests.h
+++ b/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.functions.tests.h
@@ -587,6 +587,8 @@ void test_floating_point(TestFunction check, ExceptionTest check_exception, auto
   // *** locale-specific form ***
   check(SV("[-42.5, 0, 1.25, 42.5]"), SV("{::L}"), input); // does not require locales present
 #ifndef TEST_HAS_NO_LOCALIZATION
+// TODO FMT Enable with locale testing active
+#  if 0
   std::locale::global(std::locale(LOCALE_fr_FR_UTF_8));
   check(SV("[-42,5, 0, 1,25, 42,5]"), SV("{::L}"), input);
 
@@ -594,6 +596,7 @@ void test_floating_point(TestFunction check, ExceptionTest check_exception, auto
   check(SV("[-42.5, 0, 1.25, 42.5]"), SV("{::L}"), input);
 
   std::locale::global(std::locale::classic());
+#  endif
 #endif // TEST_HAS_NO_LOCALIZATION
 
   // *** type ***


        


More information about the libcxx-commits mailing list