2 changes: 1 addition & 1 deletion libc/utils/MPFRWrapper/MPFRUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "src/__support/CPP/StringView.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/TestHelpers.h"
#include "utils/UnitTest/FPMatcher.h"

#include <cmath>
#include <memory>
Expand Down
15 changes: 15 additions & 0 deletions libc/utils/UnitTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,18 @@ target_include_directories(LibcUnitTestMain PUBLIC ${LIBC_SOURCE_DIR})
add_dependencies(LibcUnitTestMain LibcUnitTest libc.src.__support.CPP.standalone_cpp)
target_link_libraries(LibcUnitTestMain PUBLIC LibcUnitTest libc_test_utils)

add_library(
LibcFPTestHelpers
FPExceptMatcher.cpp
FPExceptMatcher.h
FPMatcher.cpp
FPMatcher.h
)
target_include_directories(LibcFPTestHelpers PUBLIC ${LIBC_SOURCE_DIR})
target_link_libraries(LibcFPTestHelpers LibcUnitTest)
add_dependencies(
LibcFPTestHelpers
LibcUnitTest
libc.src.__support.CPP.standalone_cpp
libc.src.__support.FPUtil.fputil
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_FP_EXCEPT_MATCHER_H
#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_FP_EXCEPT_MATCHER_H
#ifndef LLVM_LIBC_UTILS_UNITTEST_FPEXCEPTMATCHER_H
#define LLVM_LIBC_UTILS_UNITTEST_FPEXCEPTMATCHER_H

#ifndef LLVM_LIBC_TEST_USE_FUCHSIA

Expand Down Expand Up @@ -64,4 +64,4 @@ class FPExceptMatcher : public __llvm_libc::testing::Matcher<bool> {
#define ASSERT_RAISES_FP_EXCEPT(func) ASSERT_DEATH(func, WITH_SIGNAL(SIGFPE))
#endif // LLVM_LIBC_TEST_USE_FUCHSIA

#endif // LLVM_LIBC_SRC_SUPPORT_FPUTIL_FP_EXCEPT_MATCHER_H
#endif // LLVM_LIBC_UTILS_UNITTEST_FPEXCEPTMATCHER_H
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//
//===----------------------------------------------------------------------===//

#include "TestHelpers.h"
#include "FPMatcher.h"

#include "FPBits.h"
#include "src/__support/FPUtil/FPBits.h"

#include <string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_TEST_HELPERS_H
#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_TEST_HELPERS_H
#ifndef LLVM_LIBC_UTILS_UNITTEST_FPMATCHER_H
#define LLVM_LIBC_UTILS_UNITTEST_FPMATCHER_H

#include "FPBits.h"
#include "src/__support/FPUtil/FPBits.h"

#include "utils/UnitTest/Test.h"

Expand Down Expand Up @@ -98,4 +98,4 @@ FPMatcher<T, C> getMatcher(T expectedValue) {
__llvm_libc::fputil::testing::getMatcher<__llvm_libc::testing::Cond_NE>( \
expected))

#endif // LLVM_LIBC_SRC_SUPPORT_FPUTIL_TEST_HELPERS_H
#endif // LLVM_LIBC_UTILS_UNITTEST_FPMATCHER_H