These macros can only be used for values of type bool.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| libc/utils/UnitTest/Test.h | ||
|---|---|---|
| 90 | Ah sorry, this was supposed to be a demo patch. I will update this to make it review ready and update soon. | |
I am convinced (thanks to @gchatelet) that we can safely extend our macros to bool. Some of them, like EXPECT_LE might not be meaningful for bool, but I do not see any reason to make special effort to prevent such uses.
| libc/utils/UnitTest/Test.h | ||
|---|---|---|
| 66–68 | @gchatelet will be happy about this change :) | |
| 180–181 | Could we shorten this to EXPECT_EQ(VAL, true)? | |
| libc/utils/UnitTest/Test.h | ||
|---|---|---|
| 180–181 | Indeed! | |
@gchatelet will be happy about this change :)