Skip to content

Commit 51aab96

Browse files
[libc++][test] Small fixes for time tests (#132532)
* Fix copy-paste damage in `formatter.tai_time.pass.cpp`. + Comparing the `#if` to the `#else` case, it's clear that this half-copied check should be removed. * Mark `is_steady` as `[[maybe_unused]]`. + It's only used within `LIBCPP_STATIC_ASSERT`.
1 parent f138e36 commit 51aab96

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

libcxx/test/std/time/time.clock/time.clock.gps/types.compile.pass.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
#include "test_macros.h"
3737

3838
// class gps_clock
39-
using rep = std::chrono::gps_clock::rep;
40-
using period = std::chrono::gps_clock::period;
41-
using duration = std::chrono::gps_clock::duration;
42-
using time_point = std::chrono::gps_clock::time_point;
43-
constexpr bool is_steady = std::chrono::gps_clock::is_steady;
39+
using rep = std::chrono::gps_clock::rep;
40+
using period = std::chrono::gps_clock::period;
41+
using duration = std::chrono::gps_clock::duration;
42+
using time_point = std::chrono::gps_clock::time_point;
43+
[[maybe_unused]] constexpr bool is_steady = std::chrono::gps_clock::is_steady;
4444

4545
// Tests the values. part of them are implementation defined.
4646
LIBCPP_STATIC_ASSERT(std::same_as<rep, std::chrono::utc_clock::rep>);

libcxx/test/std/time/time.clock/time.clock.tai/types.compile.pass.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
#include "test_macros.h"
3737

3838
// class tai_clock
39-
using rep = std::chrono::tai_clock::rep;
40-
using period = std::chrono::tai_clock::period;
41-
using duration = std::chrono::tai_clock::duration;
42-
using time_point = std::chrono::tai_clock::time_point;
43-
constexpr bool is_steady = std::chrono::tai_clock::is_steady;
39+
using rep = std::chrono::tai_clock::rep;
40+
using period = std::chrono::tai_clock::period;
41+
using duration = std::chrono::tai_clock::duration;
42+
using time_point = std::chrono::tai_clock::time_point;
43+
[[maybe_unused]] constexpr bool is_steady = std::chrono::tai_clock::is_steady;
4444

4545
// Tests the values. part of them are implementation defined.
4646
LIBCPP_STATIC_ASSERT(std::same_as<rep, std::chrono::utc_clock::rep>);

libcxx/test/std/time/time.syn/formatter.tai_time.pass.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,6 @@ static void test_valid_values_day() {
268268
lfmt,
269269
cr::tai_seconds(1'613'259'090s)); // 23:31:30 TAI Friday, 13 February 2009
270270

271-
// Use the global locale (fr_FR)
272-
check(SV("%d='01'\t%Od='01'\t%e=' 1'\t%Oe=' 1'\n"),
273-
lfmt,
274271
#else // defined(_WIN32) || defined(__APPLE__) || defined(_AIX) || defined(__FreeBSD__)
275272
check(loc,
276273
SV("%d='01'\t%Od='一'\t%e=' 1'\t%Oe='一'\n"),

0 commit comments

Comments
 (0)