Adds more FP test macros for the upcoming test adds for #61092 and the issues opened from it: #88768, #88769, #88770, #88771, #88772. Fix bug in `{EXPECT,ASSERT}_FP_EXCEPTION`. `EXPECT_FP_EXCEPTION(0)` seems to be used to test that an exception did not happen, but it always does `EXPECT_GE(... & 0, 0)` which never fails. Update and refactor tests that break after the above bug fix. An interesting way things broke after the above change is that `ForceRoundingMode` and `quick_get_round()` were raising the inexact exception, breaking a lot of the `atan*` tests. The changes for all files other than `FPMatcher.h` and `libc/test/src/math/smoke/RoundToIntegerTest.h` should have the same semantics as before. For `RoundToIntegerTest.h`, lines 56-58 before the changes do not always hold since this test is used for functions with different exception and errno behavior like `lrint` and `lround`. I've deleted those lines for now, but tests for those cases should be added for the different nearest int functions to account for this. Adding @nickdesaulniers for review.
The LLVM libc unit test framework
This directory contains a lightweight implementation of a gtest like unit test framework for LLVM libc.
Why not gtest?
While gtest is great, featureful and time tested, it uses the C and C++ standard libraries. Hence, using it to test LLVM libc (which is also an implementation of the C standard libraries) causes various kinds of mixup/conflict problems.
How is it different from gtest?
LLVM libc's unit test framework is much less featureful as compared to gtest. But, what is available strives to be exactly like gtest.
Will it be made as featureful as gtest in future?
It is not clear if LLVM libc needs/will need every feature of gtest. We only intend to extend it on an as needed basis. Hence, it might never be as featureful as gtest.