[libc-commits] [PATCH] D148497: [libc][NFC] Move RandUtils.h to test/src/math.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Apr 17 08:43:46 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe2f5495010c7: [libc][NFC] Move RandUtils.h to test/src/math. (authored by sivachandra).

Changed prior to commit:
  https://reviews.llvm.org/D148497?vs=514110&id=514254#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148497/new/

https://reviews.llvm.org/D148497

Files:
  libc/test/src/CMakeLists.txt
  libc/test/src/math/CMakeLists.txt
  libc/test/src/math/FmaTest.h
  libc/test/src/math/RandUtils.cpp
  libc/test/src/math/RandUtils.h
  libc/utils/testutils/CMakeLists.txt
  libc/utils/testutils/RandUtils.cpp
  libc/utils/testutils/RandUtils.h


Index: libc/utils/testutils/CMakeLists.txt
===================================================================
--- libc/utils/testutils/CMakeLists.txt
+++ libc/utils/testutils/CMakeLists.txt
@@ -5,8 +5,6 @@
 
 add_library(
   libc_test_utils
-  RandUtils.cpp
-  RandUtils.h
   StreamWrapper.cpp
   StreamWrapper.h
   ${EFFile}
Index: libc/test/src/math/FmaTest.h
===================================================================
--- libc/test/src/math/FmaTest.h
+++ 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;
 
Index: libc/test/src/math/CMakeLists.txt
===================================================================
--- libc/test/src/math/CMakeLists.txt
+++ 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
Index: libc/test/src/CMakeLists.txt
===================================================================
--- libc/test/src/CMakeLists.txt
+++ libc/test/src/CMakeLists.txt
@@ -15,7 +15,7 @@
   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)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148497.514254.patch
Type: text/x-patch
Size: 1643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230417/2cbf4ad6/attachment.bin>


More information about the libc-commits mailing list