Skip to content

Commit 9940377

Browse files
committed
More flexible test
1 parent 17cfb4f commit 9940377

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

libcxx/test/std/time/time.hash/time.hash_enabled.pass.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include <chrono>
1616
#include "poisoned_hash_helper.h"
17+
#include "test_macros.h"
1718

1819
int main(int, char**) {
1920
test_hash_enabled<std::chrono::nanoseconds>();
@@ -55,7 +56,18 @@ int main(int, char**) {
5556
test_hash_enabled(std::chrono::year_month_weekday_last(
5657
std::chrono::year{}, std::chrono::month{}, std::chrono::weekday_last(std::chrono::weekday{})));
5758

59+
#ifndef TEST_HAS_NO_EXPERIMENTAL_TZDB
60+
5861
test_hash_enabled(std::chrono::leap_second({}, std::chrono::sys_seconds{}, std::chrono::seconds{}));
5962

63+
# if !defined(TEST_HAS_NO_LOCALIZATION) && !defined(TEST_HAS_NO_TIME_ZONE_DATABASE) && !defined(TEST_HAS_NO_FILESYSTEM)
64+
65+
test_hash_enabled<std::chrono::zoned_time<std::chrono::milliseconds>>();
66+
67+
# endif // !defined(TEST_HAS_NO_LOCALIZATION) && !defined(TEST_HAS_NO_TIME_ZONE_DATABASE) &&
68+
// !defined(TEST_HAS_NO_FILESYSTEM)
69+
70+
#endif // TEST_HAS_NO_EXPERIMENTAL_TZDB
71+
6072
return 0;
6173
}

0 commit comments

Comments
 (0)