summaryrefslogtreecommitdiff
path: root/Tests/LibM
AgeCommit message (Collapse)Author
2022-01-02Tests: Add floor and ceil tests to test-mathsin-ack
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
2021-11-18AK: Implement `acos<T>` correctlyJelle Raaijmakers
This is a naive implementation based on the symmetry with `asin`. Before, I'm not really sure what we were doing, but it was returning wildly incorrect results.
2021-11-17AK: Convert AK::Format formatting helpers to returning ErrorOr<void>Andreas Kling
This isn't a complete conversion to ErrorOr<void>, but a good chunk. The end goal here is to propagate buffer allocation failures to the caller, and allow the use of TRY() with formatting functions.
2021-09-02Tests: Remove all file(GLOB) from CMakeLists in TestsAndrew Kaster
Using a file(GLOB) to find all the test files in a directory is an easy hack to get things started, but has some drawbacks. Namely, if you add a test, it won't be found again without re-running CMake. `ninja` seems to do this automatically, but it would be nice to one day stop seeing it rechecking our globbed directories.
2021-08-08Tests: Add Clang pragma for turning off optimizationsDaniel Bertalan
Clang does not accept `GCC optimize("O0")`, so it fails to build the system with it.
2021-07-17LibM: Turn off builtins, fix tests & implementationPeter Bindels
While trying to port to Clang we found that the functions as implemented didn't actually work, and replacing them with a blatantly broken function also did not break the tests on the GCC build. It turns out we've been testing GCC's builtins by many tests. This removes the use of builtins for LibM's tests (so we test the whole function). It turns off the denormal test for scalbn (which was not implemented) and comments out the tgamma(0.5) test which is too inaccurate to be usable (and too complicated for me to fix). The gamma function was made accurate for all other test cases, and asin received two more layers of Taylor expansion to bring it within error margin for the tests.
2021-05-06Tests: Establish root Tests directory, move Userland/Tests thereBrian Gianforcaro
With the goal of centralizing all tests in the system, this is a first step to establish a Tests sub-tree. It will contain all of the unit tests and test harnesses for the various components in the system.