Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++][chrono][test] Fixes bogus loops. #101890

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

mordante
Copy link
Member

@mordante mordante commented Aug 4, 2024

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

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#100502
@mordante mordante requested a review from a team as a code owner August 4, 2024 14:19
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Aug 4, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 4, 2024

@llvm/pr-subscribers-libcxx

Author: Mark de Wever (mordante)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/101890.diff

1 Files Affected:

  • (modified) libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp (+2-2)
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, different 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

@mordante mordante merged commit 642259a into llvm:main Aug 6, 2024
59 checks passed
@mordante mordante deleted the review/fixes_bogus_loops branch August 6, 2024 17:39
banach-space pushed a commit to banach-space/llvm-project that referenced this pull request Aug 7, 2024
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#100502
TIFitis pushed a commit that referenced this pull request Aug 8, 2024
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
kstoimenov pushed a commit to kstoimenov/llvm-project that referenced this pull request Aug 15, 2024
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#100502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[libc++][test] Bogus loops in time.cal.ymdlast.nonmembers/comparisons.pass.cpp
3 participants