[flang-commits] [flang] a5b2ec9 - [flang] Fix thinko in CPU_TIME test
Diana Picus via flang-commits
flang-commits at lists.llvm.org
Tue Jul 27 03:30:04 PDT 2021
Author: Diana Picus
Date: 2021-07-27T10:29:50Z
New Revision: a5b2ec9c26db124dd7e7b576fff70ba94dc07842
URL: https://github.com/llvm/llvm-project/commit/a5b2ec9c26db124dd7e7b576fff70ba94dc07842
DIFF: https://github.com/llvm/llvm-project/commit/a5b2ec9c26db124dd7e7b576fff70ba94dc07842.diff
LOG: [flang] Fix thinko in CPU_TIME test
We used to test that end > start, but it can well be >= (otherwise the
loop doesn't make sense).
Added:
Modified:
flang/unittests/RuntimeGTest/Time.cpp
Removed:
################################################################################
diff --git a/flang/unittests/RuntimeGTest/Time.cpp b/flang/unittests/RuntimeGTest/Time.cpp
index 8ff43272cc258..1ade63ade5585 100644
--- a/flang/unittests/RuntimeGTest/Time.cpp
+++ b/flang/unittests/RuntimeGTest/Time.cpp
@@ -22,7 +22,7 @@ TEST(TimeIntrinsics, CpuTime) {
// before we time out, then we should probably look into an implementation
// for CpuTime with a better timer resolution.
for (double end = start; end == start; end = RTNAME(CpuTime)()) {
- ASSERT_GT(end, 0.0);
+ ASSERT_GE(end, 0.0);
ASSERT_GE(end, start);
}
}
More information about the flang-commits
mailing list