[libcxx-commits] [libcxx] 642259a - [libc++][chrono][test] Fixes bogus loops. (#101890)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 6 10:38:49 PDT 2024
Author: Mark de Wever
Date: 2024-08-06T19:38:46+02:00
New Revision: 642259a2f21feffb0dc048162b4ce40b1e5a303d
URL: https://github.com/llvm/llvm-project/commit/642259a2f21feffb0dc048162b4ce40b1e5a303d
DIFF: https://github.com/llvm/llvm-project/commit/642259a2f21feffb0dc048162b4ce40b1e5a303d.diff
LOG: [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: https://github.com/llvm/llvm-project/issues/100502
Added:
Modified:
libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp
index e28b6d8609bc4..5d2aa48718603 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp
@@ -59,8 +59,8 @@ constexpr bool test() {
: std::strong_ordering::greater)));
// same month,
diff erent years
- for (int i = 1000; i < 20; ++i)
- for (int j = 1000; j < 20; ++j)
+ for (int i = 1000; i < 1010; ++i)
+ for (int j = 1000; j < 1010; ++j)
assert((testOrder(year_month_day_last{year{i}, month_day_last{January}},
year_month_day_last{year{j}, month_day_last{January}},
i == j ? std::strong_ordering::equal
More information about the libcxx-commits
mailing list