Skip to content

Commit c3fe091

Browse files
mordantecopybara-github
authored andcommitted
[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: llvm/llvm-project#100502 NOKEYCHECK=True GitOrigin-RevId: 642259a2f21feffb0dc048162b4ce40b1e5a303d
1 parent 6dd205f commit c3fe091

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)