[libc-commits] [PATCH] D121564: [libc] Let exhaustive tests indicate each interval PASSED/FAILED.
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Mar 15 06:02:35 PDT 2022
lntue marked 2 inline comments as done.
lntue added inline comments.
================
Comment at: libc/test/src/math/exhaustive/exp2f_test.cpp:31
} while (bits++ < stop);
+ return result;
}
----------------
sivachandra wrote:
> 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?
Good catch!
================
Comment at: libc/utils/UnitTest/LibcTest.h:404
return; \
} while (0)
----------------
sivachandra wrote:
> To math the pattern of other `ASSERT_<>` macros, can we construct `ASSERT_THAT` using `EXPECT_THAT`?
Look like we need to have another patch to wrap other ASSERT_<> in `do { ... } while (0)` to make it not stealing `else` clause if being used inside other `if` statement.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121564/new/
https://reviews.llvm.org/D121564
More information about the libc-commits
mailing list