[libcxx-commits] [libcxx] [libcxx][test] Fix a few test conditions (PR #213512)

Ian Anderson via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 3 08:31:08 PDT 2026


================
@@ -34,9 +34,10 @@ static_assert(
 static_assert(std::is_nothrow_invocable_v<std::hash<std::chrono::year_month_weekday>, std::chrono::year_month_weekday>);
 static_assert(
     std::is_nothrow_invocable_v<std::hash<std::chrono::year_month_weekday_last>, std::chrono::year_month_weekday_last>);
-#ifndef TEST_HAS_NO_EXPERIMENTAL_TZDB
+#if !defined(TEST_HAS_NO_LOCALIZATION) && !defined(TEST_HAS_NO_TIME_ZONE_DATABASE) &&                                  \
----------------
ian-twilightcoder wrote:

No those are correct, <chrono> is
```
if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
```

But since the test macros are flipped, the equivalent is
```
#if !defined(TEST_HAS_NO_LOCALIZATION) && !defined(TEST_HAS_NO_TIME_ZONE_DATABASE) && !defined(TEST_HAS_NO_FILESYSTEM)
```
But it would help if I put the conditions in the same order.

https://github.com/llvm/llvm-project/pull/213512


More information about the libcxx-commits mailing list