]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Require tzdb support for chrono::zoned_time printer test
authorJonathan Wakely <jwakely@redhat.com>
Mon, 15 May 2023 19:36:03 +0000 (20:36 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 16 May 2023 08:59:01 +0000 (09:59 +0100)
libstdc++-v3/ChangeLog:

* testsuite/libstdc++-prettyprinters/chrono.cc: Only test
printer for chrono::zoned_time for cx11 ABI and tzdb effective
target.

libstdc++-v3/testsuite/libstdc++-prettyprinters/chrono.cc

index 01a46169393e7353081a58bb95d477746d4e7032..b5314e025ccefa0ef8f781b92680ee8fb10e3348 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-options "-g -O0 -std=gnu++2a" }
 // { dg-do run { target c++2a } }
+// { dg-additional-options "-DTEST_ZONED_TIME" { target tzdb } }
 
 // Copyright The GNU Toolchain Authors.
 //
@@ -38,7 +39,7 @@ main()
   utc_time utc(467664h);
   // { dg-final { note-test utc {std::chrono::utc_time = { 467664h }} } }
 
-#if _GLIBCXX_USE_CXX11_ABI
+#if _GLIBCXX_USE_CXX11_ABI && defined TEST_ZONED_TIME
   zoned_time<milliseconds> zt("Europe/London", half_past_epoch);
   // { dg-final { note-test zt {std::chrono::zoned_time = { "Europe/London" 1800000ms [1970-01-01 00:30:00] }} { target cxx11_abi } } }
 #endif