File tree Expand file tree Collapse file tree 5 files changed +5
-54
lines changed Expand file tree Collapse file tree 5 files changed +5
-54
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function(add_fp_unittest name)
24
24
message (FATAL_ERROR "Hermetic math test cannot require MPFR." )
25
25
endif ()
26
26
set (test_type UNIT_TEST_ONLY )
27
- list (APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper libc_math_test_utils -lmpfr -lgmp )
27
+ list (APPEND MATH_UNITTEST_LINK_LIBRARIES libcMPFRWrapper -lmpfr -lgmp )
28
28
endif ()
29
29
list (APPEND MATH_UNITTEST_LINK_LIBRARIES LibcFPTestHelpers )
30
30
Original file line number Diff line number Diff line change 1
1
add_custom_target (libc-math-unittests )
2
2
3
- # FIXME: We shouldn't have regular libraries created because we could be
4
- # cross-compiling the tests and running through an emulator.
5
- if (NOT LIBC_TARGET_OS_IS_GPU )
6
- add_library (
7
- libc_math_test_utils
8
- RandUtils.cpp
9
- RandUtils.h
10
- )
11
- endif ()
12
-
13
3
add_fp_unittest (
14
4
cosf_test
15
5
NEED_MPFR
@@ -1280,6 +1270,7 @@ add_fp_unittest(
1280
1270
fmaf_test.cpp
1281
1271
DEPENDS
1282
1272
libc.src.math.fmaf
1273
+ libc.src.stdlib.rand
1283
1274
libc.src.__support.FPUtil.fp_bits
1284
1275
FLAGS
1285
1276
FMA_OPT__ONLY
@@ -1294,6 +1285,7 @@ add_fp_unittest(
1294
1285
fma_test.cpp
1295
1286
DEPENDS
1296
1287
libc.src.math.fma
1288
+ libc.src.stdlib.rand
1297
1289
libc.src.__support.FPUtil.fp_bits
1298
1290
)
1299
1291
Original file line number Diff line number Diff line change 10
10
#define LLVM_LIBC_TEST_SRC_MATH_FMATEST_H
11
11
12
12
#include " src/__support/FPUtil/FPBits.h"
13
+ #include " src/stdlib/rand.h"
13
14
#include " test/UnitTest/FPMatcher.h"
14
15
#include " test/UnitTest/Test.h"
15
- #include " test/src/math/RandUtils.h"
16
16
#include " utils/MPFRWrapper/MPFRUtils.h"
17
17
18
18
namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
@@ -43,8 +43,7 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::Test {
43
43
StorageType get_random_bit_pattern () {
44
44
StorageType bits{0 };
45
45
for (StorageType i = 0 ; i < sizeof (StorageType) / 2 ; ++i) {
46
- bits = (bits << 2 ) +
47
- static_cast <uint16_t >(LIBC_NAMESPACE::testutils::rand ());
46
+ bits = (bits << 2 ) + static_cast <uint16_t >(LIBC_NAMESPACE::rand ());
48
47
}
49
48
return bits;
50
49
}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments