]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Skip time zone format testing for COW std::string
authorJonathan Wakely <jwakely@redhat.com>
Wed, 4 Jun 2025 20:49:54 +0000 (21:49 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 4 Jun 2025 21:00:58 +0000 (22:00 +0100)
This is needed when testing with -D_GLIBCXX_USE_CXX11_ABI=0 to fix:
FAIL: std/time/format/empty_spec.cc  -std=gnu++20 (test for excess errors)

libstdc++-v3/ChangeLog:

* testsuite/std/time/format/empty_spec.cc: Only test time zones
for cxx11 string ABI.

libstdc++-v3/testsuite/std/time/format/empty_spec.cc

index ec57a6f0d2092b45fa643e8159e14594e97259d9..a3c64f5211ef90f18e2b7e02527dc5261cc10037 100644 (file)
@@ -647,6 +647,7 @@ test_leap_second()
          WIDEN("2012-06-30 23:59:60") );
 }
 
+#if _GLIBCXX_USE_CXX11_ABI
 template<typename Dur, typename Dur2>
 auto
 make_zoned(const sys_time<Dur2>& st, const time_zone* tz)
@@ -679,6 +680,7 @@ test_zoned_time()
   verify( make_zoned<kilodays>(st, tz),
          WIDEN("2022-01-08 02:00:00 EET") );
 }
+#endif
 
 template<typename Dur, typename Dur2>
 auto
@@ -725,7 +727,9 @@ test_time_points()
   test_time_point<CharT, gps_clock>(true);
   test_time_point<CharT, file_clock>(true);
   test_leap_second<CharT>();
+#if _GLIBCXX_USE_CXX11_ABI
   test_zoned_time<CharT>();
+#endif
   test_local_time_format<CharT>();
 
   test_no_empty_spec<CharT, sys_time<years>>();