summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/test/src/CMakeLists.txt2
-rw-r--r--libc/test/src/math/CMakeLists.txt6
-rw-r--r--libc/test/src/math/FmaTest.h2
-rw-r--r--libc/test/src/math/RandUtils.cpp (renamed from libc/utils/testutils/RandUtils.cpp)0
-rw-r--r--libc/test/src/math/RandUtils.h (renamed from libc/utils/testutils/RandUtils.h)0
-rw-r--r--libc/utils/testutils/CMakeLists.txt2
6 files changed, 8 insertions, 4 deletions
diff --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt
index 6b1c7452fc28..f3f8ca88190e 100644
--- a/libc/test/src/CMakeLists.txt
+++ b/libc/test/src/CMakeLists.txt
@@ -15,7 +15,7 @@ function(add_fp_unittest name)
endif()
if(MATH_UNITTEST_NEED_MPFR)
- list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper -lmpfr -lgmp)
+ list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper libc_math_test_utils -lmpfr -lgmp)
endif()
list(APPEND MATH_UNITTEST_LINK_LIBRARIES LibcFPTestHelpers)
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 37e6183593b6..c4b883a2f988 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -1,5 +1,11 @@
add_libc_testsuite(libc_math_unittests)
+add_library(
+ libc_math_test_utils
+ RandUtils.cpp
+ RandUtils.h
+)
+
add_fp_unittest(
cosf_test
NEED_MPFR
diff --git a/libc/test/src/math/FmaTest.h b/libc/test/src/math/FmaTest.h
index 0daa4631080b..cbfe8d948b06 100644
--- a/libc/test/src/math/FmaTest.h
+++ b/libc/test/src/math/FmaTest.h
@@ -12,8 +12,8 @@
#include "src/__support/FPUtil/FPBits.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"
+#include "test/src/math/RandUtils.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
-#include "utils/testutils/RandUtils.h"
namespace mpfr = __llvm_libc::testing::mpfr;
diff --git a/libc/utils/testutils/RandUtils.cpp b/libc/test/src/math/RandUtils.cpp
index 0ccc62327f05..0ccc62327f05 100644
--- a/libc/utils/testutils/RandUtils.cpp
+++ b/libc/test/src/math/RandUtils.cpp
diff --git a/libc/utils/testutils/RandUtils.h b/libc/test/src/math/RandUtils.h
index b65a98bfed21..b65a98bfed21 100644
--- a/libc/utils/testutils/RandUtils.h
+++ b/libc/test/src/math/RandUtils.h
diff --git a/libc/utils/testutils/CMakeLists.txt b/libc/utils/testutils/CMakeLists.txt
index 2d36ae581673..be1e5a177754 100644
--- a/libc/utils/testutils/CMakeLists.txt
+++ b/libc/utils/testutils/CMakeLists.txt
@@ -5,8 +5,6 @@ endif()
add_library(
libc_test_utils
- RandUtils.cpp
- RandUtils.h
StreamWrapper.cpp
StreamWrapper.h
${EFFile}