[libc][NFC][Obvious] Use the new macro to declare special constants in tests.

GitOrigin-RevId: 50c2f2b6f0ccb5bb72896dc14ed8e8c89fa7a0c7
diff --git a/test/src/math/ceil_test.cpp b/test/src/math/ceil_test.cpp
index bed06d8..c42bdb9 100644
--- a/test/src/math/ceil_test.cpp
+++ b/test/src/math/ceil_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const double zero = FPBits::zero();
-static const double negZero = FPBits::negZero();
-static const double nan = FPBits::buildNaN(1);
-static const double inf = FPBits::inf();
-static const double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(double)
 
 TEST(CeilTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::ceil(zero));
diff --git a/test/src/math/ceilf_test.cpp b/test/src/math/ceilf_test.cpp
index 4efc07d..bfd4d52 100644
--- a/test/src/math/ceilf_test.cpp
+++ b/test/src/math/ceilf_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const float zero = FPBits::zero();
-static const float negZero = FPBits::negZero();
-static const float nan = FPBits::buildNaN(1);
-static const float inf = FPBits::inf();
-static const float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(CeilfTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::ceilf(zero));
diff --git a/test/src/math/ceill_test.cpp b/test/src/math/ceill_test.cpp
index f6cb181..ce0cc47 100644
--- a/test/src/math/ceill_test.cpp
+++ b/test/src/math/ceill_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const long double zero = FPBits::zero();
-static const long double negZero = FPBits::negZero();
-static const long double nan = FPBits::buildNaN(1);
-static const long double inf = FPBits::inf();
-static const long double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 TEST(CeillTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::ceill(zero));
diff --git a/test/src/math/copysign_test.cpp b/test/src/math/copysign_test.cpp
index 676e8fe..2bcadbc 100644
--- a/test/src/math/copysign_test.cpp
+++ b/test/src/math/copysign_test.cpp
@@ -14,11 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<double>;
 
-static const double zero = FPBits::zero();
-static const double negZero = FPBits::negZero();
-static const double nan = FPBits::buildNaN(1);
-static const double inf = FPBits::inf();
-static const double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(double)
 
 TEST(CopySignTest, SpecialNumbers) {
   EXPECT_FP_EQ(nan, __llvm_libc::copysign(nan, -1.0));
diff --git a/test/src/math/copysignf_test.cpp b/test/src/math/copysignf_test.cpp
index a7c4346..4f98c56 100644
--- a/test/src/math/copysignf_test.cpp
+++ b/test/src/math/copysignf_test.cpp
@@ -14,11 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<float>;
 
-static const float zero = FPBits::zero();
-static const float negZero = FPBits::negZero();
-static const float nan = FPBits::buildNaN(1);
-static const float inf = FPBits::inf();
-static const float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(CopySinfTest, SpecialNumbers) {
   EXPECT_FP_EQ(nan, __llvm_libc::copysignf(nan, -1.0));
diff --git a/test/src/math/copysignl_test.cpp b/test/src/math/copysignl_test.cpp
index efe54e4..e84bc8d 100644
--- a/test/src/math/copysignl_test.cpp
+++ b/test/src/math/copysignl_test.cpp
@@ -14,11 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<long double>;
 
-static const long double zero = FPBits::zero();
-static const long double negZero = FPBits::negZero();
-static const long double nan = FPBits::buildNaN(1);
-static const long double inf = FPBits::inf();
-static const long double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 TEST(CopySinlTest, SpecialNumbers) {
   EXPECT_FP_EQ(nan, __llvm_libc::copysignl(nan, -1.0));
diff --git a/test/src/math/fabs_test.cpp b/test/src/math/fabs_test.cpp
index 277ed60..1dff39b 100644
--- a/test/src/math/fabs_test.cpp
+++ b/test/src/math/fabs_test.cpp
@@ -15,11 +15,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<double>;
 
-static const double zero = FPBits::zero();
-static const double negZero = FPBits::negZero();
-static const double nan = FPBits::buildNaN(1);
-static const double inf = FPBits::inf();
-static const double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(double)
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
diff --git a/test/src/math/fabsf_test.cpp b/test/src/math/fabsf_test.cpp
index 2a73551..2243e26 100644
--- a/test/src/math/fabsf_test.cpp
+++ b/test/src/math/fabsf_test.cpp
@@ -15,11 +15,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<float>;
 
-static const float zero = FPBits::zero();
-static const float negZero = FPBits::negZero();
-static const float nan = FPBits::buildNaN(1);
-static const float inf = FPBits::inf();
-static const float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
diff --git a/test/src/math/fabsl_test.cpp b/test/src/math/fabsl_test.cpp
index 86f1275..51edd4c 100644
--- a/test/src/math/fabsl_test.cpp
+++ b/test/src/math/fabsl_test.cpp
@@ -15,11 +15,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<long double>;
 
-static const long double zero = FPBits::zero();
-static const long double negZero = FPBits::negZero();
-static const long double nan = FPBits::buildNaN(1);
-static const long double inf = FPBits::inf();
-static const long double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
diff --git a/test/src/math/floor_test.cpp b/test/src/math/floor_test.cpp
index 5f59c3c..d0e2654 100644
--- a/test/src/math/floor_test.cpp
+++ b/test/src/math/floor_test.cpp
@@ -15,13 +15,9 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<double>;
 
-namespace mpfr = __llvm_libc::testing::mpfr;
+DECLARE_SPECIAL_CONSTANTS(double)
 
-static const double zero = FPBits::zero();
-static const double negZero = FPBits::negZero();
-static const double nan = FPBits::buildNaN(1);
-static const double inf = FPBits::inf();
-static const double negInf = FPBits::negInf();
+namespace mpfr = __llvm_libc::testing::mpfr;
 
 TEST(FloorTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::floor(zero));
diff --git a/test/src/math/floorf_test.cpp b/test/src/math/floorf_test.cpp
index 08c3463..8de4ab2 100644
--- a/test/src/math/floorf_test.cpp
+++ b/test/src/math/floorf_test.cpp
@@ -15,13 +15,9 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<float>;
 
-namespace mpfr = __llvm_libc::testing::mpfr;
+DECLARE_SPECIAL_CONSTANTS(float)
 
-static const float zero = FPBits::zero();
-static const float negZero = FPBits::negZero();
-static const float nan = FPBits::buildNaN(1);
-static const float inf = FPBits::inf();
-static const float negInf = FPBits::negInf();
+namespace mpfr = __llvm_libc::testing::mpfr;
 
 TEST(FloorfTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::floorf(zero));
diff --git a/test/src/math/floorl_test.cpp b/test/src/math/floorl_test.cpp
index c6aea65..9f70cad 100644
--- a/test/src/math/floorl_test.cpp
+++ b/test/src/math/floorl_test.cpp
@@ -15,13 +15,9 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<long double>;
 
-namespace mpfr = __llvm_libc::testing::mpfr;
+DECLARE_SPECIAL_CONSTANTS(long double)
 
-static const long double zero = FPBits::zero();
-static const long double negZero = FPBits::negZero();
-static const long double nan = FPBits::buildNaN(1);
-static const long double inf = FPBits::inf();
-static const long double negInf = FPBits::negInf();
+namespace mpfr = __llvm_libc::testing::mpfr;
 
 TEST(FloorlTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::floorl(zero));
diff --git a/test/src/math/fmax_test.cpp b/test/src/math/fmax_test.cpp
index 0dc57e4..5579bb6 100644
--- a/test/src/math/fmax_test.cpp
+++ b/test/src/math/fmax_test.cpp
@@ -14,9 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<double>;
 
-double nan = FPBits::buildNaN(1);
-double inf = FPBits::inf();
-double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(double)
 
 TEST(FmaxTest, NaNArg) {
   EXPECT_FP_EQ(inf, __llvm_libc::fmax(nan, inf));
diff --git a/test/src/math/fmaxf_test.cpp b/test/src/math/fmaxf_test.cpp
index fc8f1cc..d4d92bf 100644
--- a/test/src/math/fmaxf_test.cpp
+++ b/test/src/math/fmaxf_test.cpp
@@ -14,9 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<float>;
 
-float nan = FPBits::buildNaN(1);
-float inf = FPBits::inf();
-float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(FmaxfTest, NaNArg) {
   EXPECT_FP_EQ(inf, __llvm_libc::fmaxf(nan, inf));
diff --git a/test/src/math/fmaxl_test.cpp b/test/src/math/fmaxl_test.cpp
index ac62899..be9b0c8 100644
--- a/test/src/math/fmaxl_test.cpp
+++ b/test/src/math/fmaxl_test.cpp
@@ -14,9 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<long double>;
 
-long double nan = FPBits::buildNaN(1);
-long double inf = FPBits::inf();
-long double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 TEST(FmaxlTest, NaNArg) {
   EXPECT_FP_EQ(inf, __llvm_libc::fmaxl(nan, inf));
diff --git a/test/src/math/fmin_test.cpp b/test/src/math/fmin_test.cpp
index 47a4433..67d7550 100644
--- a/test/src/math/fmin_test.cpp
+++ b/test/src/math/fmin_test.cpp
@@ -14,9 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<double>;
 
-double nan = static_cast<double>(FPBits::buildNaN(1));
-double inf = static_cast<double>(FPBits::inf());
-double negInf = static_cast<double>(FPBits::negInf());
+DECLARE_SPECIAL_CONSTANTS(double)
 
 TEST(FminTest, NaNArg) {
   EXPECT_FP_EQ(inf, __llvm_libc::fmin(nan, inf));
diff --git a/test/src/math/fminf_test.cpp b/test/src/math/fminf_test.cpp
index 20bcdb9..a40bf02 100644
--- a/test/src/math/fminf_test.cpp
+++ b/test/src/math/fminf_test.cpp
@@ -14,9 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<float>;
 
-float nan = static_cast<float>(FPBits::buildNaN(1));
-float inf = static_cast<float>(FPBits::inf());
-float negInf = static_cast<float>(FPBits::negInf());
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(FminfTest, NaNArg) {
   EXPECT_FP_EQ(inf, __llvm_libc::fminf(nan, inf));
diff --git a/test/src/math/fminl_test.cpp b/test/src/math/fminl_test.cpp
index ea770bc..274ef29 100644
--- a/test/src/math/fminl_test.cpp
+++ b/test/src/math/fminl_test.cpp
@@ -14,9 +14,7 @@
 
 using FPBits = __llvm_libc::fputil::FPBits<long double>;
 
-long double nan = static_cast<long double>(FPBits::buildNaN(1));
-long double inf = static_cast<long double>(FPBits::inf());
-long double negInf = static_cast<long double>(FPBits::negInf());
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 TEST(FminlTest, NaNArg) {
   EXPECT_FP_EQ(inf, __llvm_libc::fminl(nan, inf));
diff --git a/test/src/math/hypotf_test.cpp b/test/src/math/hypotf_test.cpp
index 7b1ffd5..eb06c79 100644
--- a/test/src/math/hypotf_test.cpp
+++ b/test/src/math/hypotf_test.cpp
@@ -18,11 +18,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const float zero = FPBits::zero();
-static const float negZero = FPBits::negZero();
-static const float nan = FPBits::buildNaN(1);
-static const float inf = FPBits::inf();
-static const float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(HypotfTest, SpecialNumbers) {
   EXPECT_FP_EQ(__llvm_libc::hypotf(inf, nan), inf);
diff --git a/test/src/math/round_test.cpp b/test/src/math/round_test.cpp
index 0ff1fde..8d91145 100644
--- a/test/src/math/round_test.cpp
+++ b/test/src/math/round_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const double zero = FPBits::zero();
-static const double negZero = FPBits::negZero();
-static const double nan = FPBits::buildNaN(1);
-static const double inf = FPBits::inf();
-static const double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(double)
 
 TEST(RoundTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::round(zero));
diff --git a/test/src/math/roundf_test.cpp b/test/src/math/roundf_test.cpp
index 6ddd122..93252da 100644
--- a/test/src/math/roundf_test.cpp
+++ b/test/src/math/roundf_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const float zero = FPBits::zero();
-static const float negZero = FPBits::negZero();
-static const float nan = FPBits::buildNaN(1);
-static const float inf = FPBits::inf();
-static const float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(RoundfTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::roundf(zero));
diff --git a/test/src/math/roundl_test.cpp b/test/src/math/roundl_test.cpp
index e032f51..424dd78 100644
--- a/test/src/math/roundl_test.cpp
+++ b/test/src/math/roundl_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const long double zero = FPBits::zero();
-static const long double negZero = FPBits::negZero();
-static const long double nan = FPBits::buildNaN(1);
-static const long double inf = FPBits::inf();
-static const long double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 TEST(RoundlTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::roundl(zero));
diff --git a/test/src/math/sqrt_test.cpp b/test/src/math/sqrt_test.cpp
index 7ff4978..1fda63e 100644
--- a/test/src/math/sqrt_test.cpp
+++ b/test/src/math/sqrt_test.cpp
@@ -20,9 +20,7 @@
 constexpr UIntType HiddenBit =
     UIntType(1) << __llvm_libc::fputil::MantissaWidth<double>::value;
 
-double nan = FPBits::buildNaN(1);
-double inf = FPBits::inf();
-double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(double)
 
 TEST(SqrtTest, SpecialValues) {
   ASSERT_FP_EQ(nan, __llvm_libc::sqrt(nan));
diff --git a/test/src/math/sqrtf_test.cpp b/test/src/math/sqrtf_test.cpp
index 8c42906..1e9eda0 100644
--- a/test/src/math/sqrtf_test.cpp
+++ b/test/src/math/sqrtf_test.cpp
@@ -20,9 +20,7 @@
 constexpr UIntType HiddenBit =
     UIntType(1) << __llvm_libc::fputil::MantissaWidth<float>::value;
 
-float nan = FPBits::buildNaN(1);
-float inf = FPBits::inf();
-float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(SqrtfTest, SpecialValues) {
   ASSERT_FP_EQ(nan, __llvm_libc::sqrtf(nan));
diff --git a/test/src/math/sqrtl_test.cpp b/test/src/math/sqrtl_test.cpp
index 1fab3b2..36b3030 100644
--- a/test/src/math/sqrtl_test.cpp
+++ b/test/src/math/sqrtl_test.cpp
@@ -20,9 +20,7 @@
 constexpr UIntType HiddenBit =
     UIntType(1) << __llvm_libc::fputil::MantissaWidth<long double>::value;
 
-long double nan = FPBits::buildNaN(1);
-long double inf = FPBits::inf();
-long double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 TEST(SqrtlTest, SpecialValues) {
   ASSERT_FP_EQ(nan, __llvm_libc::sqrtl(nan));
diff --git a/test/src/math/trunc_test.cpp b/test/src/math/trunc_test.cpp
index 806f02c..0a322fa 100644
--- a/test/src/math/trunc_test.cpp
+++ b/test/src/math/trunc_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const double zero = FPBits::zero();
-static const double negZero = FPBits::negZero();
-static const double nan = FPBits::buildNaN(1);
-static const double inf = FPBits::inf();
-static const double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(double)
 
 TEST(TruncTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::trunc(zero));
diff --git a/test/src/math/truncf_test.cpp b/test/src/math/truncf_test.cpp
index 99cb487..0732614 100644
--- a/test/src/math/truncf_test.cpp
+++ b/test/src/math/truncf_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const float zero = FPBits::zero();
-static const float negZero = FPBits::negZero();
-static const float nan = FPBits::buildNaN(1);
-static const float inf = FPBits::inf();
-static const float negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(float)
 
 TEST(TruncfTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::truncf(zero));
diff --git a/test/src/math/truncl_test.cpp b/test/src/math/truncl_test.cpp
index 8f7668d..ab05d01 100644
--- a/test/src/math/truncl_test.cpp
+++ b/test/src/math/truncl_test.cpp
@@ -17,11 +17,7 @@
 
 namespace mpfr = __llvm_libc::testing::mpfr;
 
-static const long double zero = FPBits::zero();
-static const long double negZero = FPBits::negZero();
-static const long double nan = FPBits::buildNaN(1);
-static const long double inf = FPBits::inf();
-static const long double negInf = FPBits::negInf();
+DECLARE_SPECIAL_CONSTANTS(long double)
 
 TEST(TrunclTest, SpecialNumbers) {
   EXPECT_FP_EQ(zero, __llvm_libc::truncl(zero));