Skip to content

Commit 07cb87c

Browse files
author
MarcoFalke
committed
test_fixups_2
1 parent 9980f08 commit 07cb87c

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

libcxx/test/std/time/time.point/time.point.arithmetic/op_++.pass.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
#include "test_macros.h"
2020

2121
constexpr bool test() {
22-
typedef std::chrono::system_clock Clock;
23-
typedef std::chrono::milliseconds Duration;
22+
using Clock = std::chrono::system_clock;
23+
using Duration = std::chrono::milliseconds;
2424
std::chrono::time_point<Clock, Duration> t{Duration{5}};
2525
std::chrono::time_point<Clock, Duration>& tref{++t};
26-
return &tref == &t && tref.time_since_epoch() == Duration{6};
26+
assert(&tref == &t);
27+
assert(tref.time_since_epoch() == Duration{6});
28+
return true;
2729
}
2830

2931
int main(int, char**) {

libcxx/test/std/time/time.point/time.point.arithmetic/op_++int.pass.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
#include "test_macros.h"
2020

2121
constexpr bool test() {
22-
typedef std::chrono::system_clock Clock;
23-
typedef std::chrono::milliseconds Duration;
22+
using Clock = std::chrono::system_clock;
23+
using Duration = std::chrono::milliseconds;
2424
std::chrono::time_point<Clock, Duration> t1{Duration{3}};
2525
std::chrono::time_point<Clock, Duration> t2{t1++};
26-
return t1.time_since_epoch() == Duration{4} && t2.time_since_epoch() == Duration{3};
26+
assert(t1.time_since_epoch() == Duration{4});
27+
assert(t2.time_since_epoch() == Duration{3});
28+
return true;
2729
}
2830

2931
int main(int, char**) {

libcxx/test/std/time/time.point/time.point.arithmetic/op_--.pass.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
#include "test_macros.h"
2020

2121
constexpr bool test() {
22-
typedef std::chrono::system_clock Clock;
23-
typedef std::chrono::milliseconds Duration;
22+
using Clock = std::chrono::system_clock;
23+
using Duration = std::chrono::milliseconds;
2424
std::chrono::time_point<Clock, Duration> t{Duration{5}};
2525
std::chrono::time_point<Clock, Duration>& tref{--t};
26-
return &tref == &t && tref.time_since_epoch() == Duration{4};
26+
assert(&tref == &t);
27+
assert(tref.time_since_epoch() == Duration{4});
28+
return true;
2729
}
2830

2931
int main(int, char**) {

libcxx/test/std/time/time.point/time.point.arithmetic/op_--int.pass.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
#include "test_macros.h"
2020

2121
constexpr bool test() {
22-
typedef std::chrono::system_clock Clock;
23-
typedef std::chrono::milliseconds Duration;
22+
using Clock = std::chrono::system_clock;
23+
using Duration = std::chrono::milliseconds;
2424
std::chrono::time_point<Clock, Duration> t1{Duration{3}};
2525
std::chrono::time_point<Clock, Duration> t2{t1--};
26-
return t1.time_since_epoch() == Duration{2} && t2.time_since_epoch() == Duration{3};
26+
assert(t1.time_since_epoch() == Duration{2});
27+
assert(t2.time_since_epoch() == Duration{3});
28+
return true;
2729
}
2830

2931
int main(int, char**) {

0 commit comments

Comments
 (0)