[libcxx-commits] [PATCH] D142311: [libc++][test] Improves locale validation.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 30 10:56:12 PST 2023


Mordante added inline comments.


================
Comment at: libcxx/test/std/utilities/format/format.range/format.range.formatter/format.functions.tests.h:590
 #ifndef TEST_HAS_NO_LOCALIZATION
-// TODO FMT Enable with locale testing active
-#  if 0
+#  ifdef TEST_HAS_LOCALE_fr_FR_UTF_8
   std::locale::global(std::locale(LOCALE_fr_FR_UTF_8));
----------------
arichardson wrote:
> How about generating a header with these macros set to 0/1, then typos could be caught by -Werror=undef?
Typically we use a different way to define these macros
```
#  ifndef TEST_HAS_NO_LOCALE_fr_FR_UTF_8
```
I just didn't do that yet to discuss whether this basic approach is feasible.
Then the macro doesn't need 0/1.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142311/new/

https://reviews.llvm.org/D142311



More information about the libcxx-commits mailing list