@@ -36,9 +36,10 @@ class SubTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
36
36
InFPBits::min_subnormal ().uintval();
37
37
38
38
public:
39
- typedef OutType (*AddFunc )(InType, InType);
39
+ using SubFunc = OutType (*)(InType, InType);
40
40
41
- void test_subnormal_range (AddFunc func) {
41
+ void test_subnormal_range (SubFunc func) {
42
+ constexpr InStorageType COUNT = 100'001 ;
42
43
constexpr InStorageType STEP =
43
44
(IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT;
44
45
for (InStorageType i = 0 , v = 0 , w = IN_MAX_SUBNORMAL_U; i <= COUNT;
@@ -51,7 +52,7 @@ class SubTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
51
52
}
52
53
}
53
54
54
- void test_normal_range (AddFunc func) {
55
+ void test_normal_range (SubFunc func) {
55
56
constexpr InStorageType COUNT = 100'001 ;
56
57
constexpr InStorageType STEP = (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT;
57
58
for (InStorageType i = 0 , v = 0 , w = IN_MAX_NORMAL_U; i <= COUNT;
@@ -70,4 +71,4 @@ class SubTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
70
71
TEST_F (LlvmLibcSubTest, SubnormalRange) { test_subnormal_range (&func); } \
71
72
TEST_F (LlvmLibcSubTest, NormalRange) { test_normal_range (&func); }
72
73
73
- #endif // LLVM_LIBC_TEST_SRC_MATH_ADDTEST_H
74
+ #endif // LLVM_LIBC_TEST_SRC_MATH_SUBTEST_H
0 commit comments