Skip to content

Commit 642259a

Browse files
authored
[libc++][chrono][test] Fixes bogus loops. (#101890)
Changes the loop range to match similar tests and avoids zero iterations. The original motivation to reduce the number of iterations was to allow the test to be executed during constant evaluation. Fixes: #100502
1 parent f55abd5 commit 642259a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ constexpr bool test() {
5959
: std::strong_ordering::greater)));
6060

6161
// same month, different years
62-
for (int i = 1000; i < 20; ++i)
63-
for (int j = 1000; j < 20; ++j)
62+
for (int i = 1000; i < 1010; ++i)
63+
for (int j = 1000; j < 1010; ++j)
6464
assert((testOrder(year_month_day_last{year{i}, month_day_last{January}},
6565
year_month_day_last{year{j}, month_day_last{January}},
6666
i == j ? std::strong_ordering::equal

0 commit comments

Comments
 (0)