Let exhaustive tests indicate each interval PASSED/FAILED.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/test/src/math/exhaustive/exp2f_test.cpp | ||
---|---|---|
31 ↗ | (On Diff #415096) | This pattern seems to have a logic flaw. For example, since we use an EXPECT_<> macro, a following success/failure can overwrite the previous failure/success. You probably want result &&= <...> on line 28? |
libc/utils/UnitTest/LibcTest.h | ||
404 ↗ | (On Diff #415096) | To math the pattern of other ASSERT_<> macros, can we construct ASSERT_THAT using EXPECT_THAT? |
libc/utils/UnitTest/LibcTest.h | ||
---|---|---|
404 ↗ | (On Diff #415096) | They are not compound statements so shouldn't require a do {...} while (0) treatment? |
libc/utils/UnitTest/LibcTest.h | ||
---|---|---|
404 ↗ | (On Diff #415096) | What I'm thinking is in the case that we have something like: if (cond) ASSERT_<>(...); else ASSERT_<>(...); then without the do { ... } while (0) treatment, it will silently do the wrong branching due to the else is stolen from the first ASSERT. |
Since its a bool value, would it better as a return value instead of reference argument?