[libc][NFC] Add library of floating point test matchers.
authorSiva Chandra Reddy <sivachandra@google.com>
Thu, 6 Aug 2020 07:19:08 +0000 (00:19 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Sat, 8 Aug 2020 06:34:15 +0000 (23:34 -0700)
commitdb936e0e915377a58032dccc13bedbfccf0a1ca8
treeac237c9dd4aa323ca6f5b5bce51a3d31244fe991
parent5c9c4ade9d1269e83fdf8e5d8f62b376a76da2b0
[libc][NFC] Add library of floating point test matchers.

This eliminates UnitTest's dependency on FPUtil and hence prevents
non-math tests from depending indirectly on FPUtil. The patch
essentially moves some of the existing pieces into a library of its own.

Along the way, renamed add_math_unittest to add_fp_unittest.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D85486
12 files changed:
libc/test/src/math/CMakeLists.txt
libc/test/src/math/fmax_test.cpp
libc/test/src/math/fmaxf_test.cpp
libc/test/src/math/fmaxl_test.cpp
libc/test/src/math/fmin_test.cpp
libc/test/src/math/fminf_test.cpp
libc/test/src/math/fminl_test.cpp
libc/utils/FPUtil/CMakeLists.txt
libc/utils/FPUtil/TestHelpers.cpp [new file with mode: 0644]
libc/utils/FPUtil/TestHelpers.h [new file with mode: 0644]
libc/utils/UnitTest/Test.cpp
libc/utils/UnitTest/Test.h