Skip to content

Commit e2f5495

Browse files
author
Siva Chandra Reddy
committed
[libc][NFC] Move RandUtils.h to test/src/math.
It is currently used only by math tests so moving it to test/src/math keeps it closer to where it is used. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D148497
1 parent ee34137 commit e2f5495

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

libc/test/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function(add_fp_unittest name)
1515
endif()
1616

1717
if(MATH_UNITTEST_NEED_MPFR)
18-
list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper -lmpfr -lgmp)
18+
list(APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper libc_math_test_utils -lmpfr -lgmp)
1919
endif()
2020
list(APPEND MATH_UNITTEST_LINK_LIBRARIES LibcFPTestHelpers)
2121

libc/test/src/math/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
add_libc_testsuite(libc_math_unittests)
22

3+
add_library(
4+
libc_math_test_utils
5+
RandUtils.cpp
6+
RandUtils.h
7+
)
8+
39
add_fp_unittest(
410
cosf_test
511
NEED_MPFR

libc/test/src/math/FmaTest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#include "src/__support/FPUtil/FPBits.h"
1313
#include "test/UnitTest/FPMatcher.h"
1414
#include "test/UnitTest/Test.h"
15+
#include "test/src/math/RandUtils.h"
1516
#include "utils/MPFRWrapper/MPFRUtils.h"
16-
#include "utils/testutils/RandUtils.h"
1717

1818
namespace mpfr = __llvm_libc::testing::mpfr;
1919

File renamed without changes.
File renamed without changes.

libc/utils/testutils/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ endif()
55

66
add_library(
77
libc_test_utils
8-
RandUtils.cpp
9-
RandUtils.h
108
StreamWrapper.cpp
119
StreamWrapper.h
1210
${EFFile}

0 commit comments

Comments
 (0)