Skip to content

Commit eac9a9d

Browse files
frederick-vs-javinay-deshmukh
authored andcommitted
[libc++][test] Fix-up tests for is_clock(_v) (llvm#166888)
This fixes incompleteness and inconsistency for test files added in adc7932, by - renaming `libcxx/test/std/time/time.traits.is.clock/trait.is.clock.compile.pass.cpp` to `libcxx/test/std/time/time.traits/is.clock.compile.pass.cpp`, - renaming `libcxx/test/libcxx/time/time.traits.is.clock/trait.is.clock.compile.verify.cpp` to `libcxx/test/libcxx/time/time.traits/is.clock.verify.cpp` , and - adding comments clarifying what are being tested.
1 parent 579270f commit eac9a9d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88

99
// REQUIRES: std-at-least-c++20
1010

11+
// <chrono>
12+
//
13+
// template<class T> struct is_clock;
14+
// template<class T> constexpr bool is_clock_v = is_clock<T>::value;
15+
16+
// [time.traits.is.clock]/3:
17+
// The behavior of a program that adds specializations for is_clock is undefined.
18+
19+
// [namespace.std]/3:
20+
// The behavior of a C++ program is undefined if it declares an explicit or partial specialization of any standard
21+
// library variable template, except where explicitly permitted by the specification of that variable template.
22+
1123
#include <chrono>
1224
#include <ratio>
1325

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
// REQUIRES: std-at-least-c++20
1010

11+
// <chrono>
12+
//
13+
// template<class T> struct is_clock;
14+
// template<class T> constexpr bool is_clock_v = is_clock<T>::value;
15+
1116
#include <chrono>
1217
#include <ratio>
1318

0 commit comments

Comments
 (0)