[libc-commits] [libc] 689de58 - [libc][NFC][obvious] fix the names of MPFR tests

Michael Jones via libc-commits libc-commits at lists.llvm.org
Wed Jan 20 15:44:10 PST 2021


Author: Michael Jones
Date: 2021-01-20T23:42:01Z
New Revision: 689de5841c1c4c9b0fe711b61d26f7425cf99423

URL: https://github.com/llvm/llvm-project/commit/689de5841c1c4c9b0fe711b61d26f7425cf99423
DIFF: https://github.com/llvm/llvm-project/commit/689de5841c1c4c9b0fe711b61d26f7425cf99423.diff

LOG: [libc][NFC][obvious] fix the names of MPFR tests

I missed the MPFR tests in my previous commit. They have now been fixed
to not fail the prefix check in the test macro.

Added: 
    

Modified: 
    libc/test/src/math/RIntTest.h
    libc/test/src/math/RemQuoTest.h
    libc/test/src/math/RoundToIntegerTest.h
    libc/test/src/math/fmaf_test.cpp
    libc/test/src/math/hypot_test.cpp
    libc/test/src/math/hypotf_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/math/RIntTest.h b/libc/test/src/math/RIntTest.h
index d09dc9324977..18331ecdad08 100644
--- a/libc/test/src/math/RIntTest.h
+++ b/libc/test/src/math/RIntTest.h
@@ -128,11 +128,11 @@ class RIntTestTemplate : public __llvm_libc::testing::Test {
 };
 
 #define LIST_RINT_TESTS(F, func)                                               \
-  using RIntTest = RIntTestTemplate<F>;                                        \
-  TEST_F(RIntTest, specialNumbers) { testSpecialNumbers(&func); }              \
-  TEST_F(RIntTest, RoundNumbers) { testRoundNumbers(&func); }                  \
-  TEST_F(RIntTest, Fractions) { testFractions(&func); }                        \
-  TEST_F(RIntTest, SubnormalRange) { testSubnormalRange(&func); }              \
-  TEST_F(RIntTest, NormalRange) { testNormalRange(&func); }
+  using LlvmLibcRIntTest = RIntTestTemplate<F>;                                \
+  TEST_F(LlvmLibcRIntTest, specialNumbers) { testSpecialNumbers(&func); }      \
+  TEST_F(LlvmLibcRIntTest, RoundNumbers) { testRoundNumbers(&func); }          \
+  TEST_F(LlvmLibcRIntTest, Fractions) { testFractions(&func); }                \
+  TEST_F(LlvmLibcRIntTest, SubnormalRange) { testSubnormalRange(&func); }      \
+  TEST_F(LlvmLibcRIntTest, NormalRange) { testNormalRange(&func); }
 
 #endif // LLVM_LIBC_TEST_SRC_MATH_RINTTEST_H

diff  --git a/libc/test/src/math/RemQuoTest.h b/libc/test/src/math/RemQuoTest.h
index 1e00ee14927e..f643079b89ac 100644
--- a/libc/test/src/math/RemQuoTest.h
+++ b/libc/test/src/math/RemQuoTest.h
@@ -133,12 +133,12 @@ class RemQuoTestTemplate : public __llvm_libc::testing::Test {
 };
 
 #define LIST_REMQUO_TESTS(T, func)                                             \
-  using RemQuoTest = RemQuoTestTemplate<T>;                                    \
-  TEST_F(RemQuoTest, SpecialNumbers) { testSpecialNumbers(&func); }            \
-  TEST_F(RemQuoTest, EqualNumeratorAndDenominator) {                           \
+  using LlvmLibcRemQuoTest = RemQuoTestTemplate<T>;                            \
+  TEST_F(LlvmLibcRemQuoTest, SpecialNumbers) { testSpecialNumbers(&func); }    \
+  TEST_F(LlvmLibcRemQuoTest, EqualNumeratorAndDenominator) {                   \
     testEqualNumeratorAndDenominator(&func);                                   \
   }                                                                            \
-  TEST_F(RemQuoTest, SubnormalRange) { testSubnormalRange(&func); }            \
-  TEST_F(RemQuoTest, NormalRange) { testNormalRange(&func); }
+  TEST_F(LlvmLibcRemQuoTest, SubnormalRange) { testSubnormalRange(&func); }    \
+  TEST_F(LlvmLibcRemQuoTest, NormalRange) { testNormalRange(&func); }
 
 #endif // LLVM_LIBC_TEST_SRC_MATH_REMQUOTEST_H

diff  --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h
index d8711faca3f1..4b28039dbbb3 100644
--- a/libc/test/src/math/RoundToIntegerTest.h
+++ b/libc/test/src/math/RoundToIntegerTest.h
@@ -304,13 +304,22 @@ class RoundToIntegerTestTemplate : public __llvm_libc::testing::Test {
 };
 
 #define LIST_ROUND_TO_INTEGER_TESTS_HELPER(F, I, func, TestModes)              \
-  using RoundToIntegerTest = RoundToIntegerTestTemplate<F, I, TestModes>;      \
-  TEST_F(RoundToIntegerTest, InfinityAndNaN) { testInfinityAndNaN(&func); }    \
-  TEST_F(RoundToIntegerTest, RoundNumbers) { testRoundNumbers(&func); }        \
-  TEST_F(RoundToIntegerTest, Fractions) { testFractions(&func); }              \
-  TEST_F(RoundToIntegerTest, IntegerOverflow) { testIntegerOverflow(&func); }  \
-  TEST_F(RoundToIntegerTest, SubnormalRange) { testSubnormalRange(&func); }    \
-  TEST_F(RoundToIntegerTest, NormalRange) { testNormalRange(&func); }
+  using LlvmLibcRoundToIntegerTest =                                           \
+      RoundToIntegerTestTemplate<F, I, TestModes>;                             \
+  TEST_F(LlvmLibcRoundToIntegerTest, InfinityAndNaN) {                         \
+    testInfinityAndNaN(&func);                                                 \
+  }                                                                            \
+  TEST_F(LlvmLibcRoundToIntegerTest, RoundNumbers) {                           \
+    testRoundNumbers(&func);                                                   \
+  }                                                                            \
+  TEST_F(LlvmLibcRoundToIntegerTest, Fractions) { testFractions(&func); }      \
+  TEST_F(LlvmLibcRoundToIntegerTest, IntegerOverflow) {                        \
+    testIntegerOverflow(&func);                                                \
+  }                                                                            \
+  TEST_F(LlvmLibcRoundToIntegerTest, SubnormalRange) {                         \
+    testSubnormalRange(&func);                                                 \
+  }                                                                            \
+  TEST_F(LlvmLibcRoundToIntegerTest, NormalRange) { testNormalRange(&func); }
 
 #define LIST_ROUND_TO_INTEGER_TESTS(F, I, func)                                \
   LIST_ROUND_TO_INTEGER_TESTS_HELPER(F, I, func, false)

diff  --git a/libc/test/src/math/fmaf_test.cpp b/libc/test/src/math/fmaf_test.cpp
index 7db666b622bc..f58698c95851 100644
--- a/libc/test/src/math/fmaf_test.cpp
+++ b/libc/test/src/math/fmaf_test.cpp
@@ -10,7 +10,7 @@
 
 #include "src/math/fmaf.h"
 
-using FmaTest = FmaTestTemplate<float>;
+using LlvmLibcFmaTest = FmaTestTemplate<float>;
 
 TEST_F(LlvmLibcFmaTest, SpecialNumbers) {
   testSpecialNumbers(&__llvm_libc::fmaf);

diff  --git a/libc/test/src/math/hypot_test.cpp b/libc/test/src/math/hypot_test.cpp
index e8604ccc217e..928c38a494f6 100644
--- a/libc/test/src/math/hypot_test.cpp
+++ b/libc/test/src/math/hypot_test.cpp
@@ -10,7 +10,7 @@
 
 #include "src/math/hypot.h"
 
-using HypotTest = HypotTestTemplate<double>;
+using LlvmLibcHypotTest = HypotTestTemplate<double>;
 
 TEST_F(LlvmLibcHypotTest, SpecialNumbers) {
   testSpecialNumbers(&__llvm_libc::hypot);

diff  --git a/libc/test/src/math/hypotf_test.cpp b/libc/test/src/math/hypotf_test.cpp
index ef4ef688ed87..94f102efb73f 100644
--- a/libc/test/src/math/hypotf_test.cpp
+++ b/libc/test/src/math/hypotf_test.cpp
@@ -10,7 +10,7 @@
 
 #include "src/math/hypotf.h"
 
-using HypotfTest = HypotTestTemplate<float>;
+using LlvmLibcHypotfTest = HypotTestTemplate<float>;
 
 TEST_F(LlvmLibcHypotfTest, SpecialNumbers) {
   testSpecialNumbers(&__llvm_libc::hypotf);


        


More information about the libc-commits mailing list