[libc] Improve information printed on failure of a math test which uses MPFR.
authorSiva Chandra Reddy <sivachandra@google.com>
Fri, 1 May 2020 07:54:33 +0000 (00:54 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Tue, 5 May 2020 17:26:29 +0000 (10:26 -0700)
commitd69cbd826a8f3f3860ce97e22ab17601038480d0
treefe3892df23eb89435a7a312c567c99fbc1eebbd7
parent7cbbf89d230d46c3de9a7affc29b23f08c4377a1
[libc] Improve information printed on failure of a math test which uses MPFR.

A new test matcher class MPFRMatcher is added along with helper macros
EXPECT|ASSERT_MPFR_MATCH.

New type traits classes RemoveCV and IsFloatingPointType have been
added and used to implement the above class and its helpers.

Reviewers: abrachet, phosek

Differential Revision: https://reviews.llvm.org/D79256
libc/test/src/math/cosf_test.cpp
libc/test/src/math/sincosf_test.cpp
libc/test/src/math/sinf_test.cpp
libc/utils/CPP/TypeTraits.h
libc/utils/MPFRWrapper/CMakeLists.txt
libc/utils/MPFRWrapper/MPFRUtils.cpp
libc/utils/MPFRWrapper/MPFRUtils.h
libc/utils/testutils/StreamWrapper.cpp