I accidentally wrote testComparisons(...) instead of
assert(testComparisons(...). This compiled without issues, but
did not provide the intended test coverage. By adding a nodiscard,
we can make sure that the compiler catches such mistakes for us.
Details
Details
- Reviewers
Mordante philnik ldionne mumbleskates - Group Reviewers
Restricted Project - Commits
- rGd7e0cec60ee3: [libc++][test] Mark `test_comparisons.h` helpers as nodiscard
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
You shouldn't use libc++-specific macros in the tests. Instead, add a new macro to test_macros.h and use it here. Otherwise the tests that use test_comparisons.h would break for other implementations.