Skip to content

Commit ef0ab03

Browse files
author
Artur Bać
committed
fix msvc toolset
1 parent 27a16e1 commit ef0ab03

7 files changed

+30
-1
lines changed

unit_tests/addition_ut.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ using boost::ut::operator""_test;
55
using namespace metatests;
66
using namespace fixedmath;
77

8+
static constexpr auto msvc_nonsense_non_constexpr_fix_max_ { limits_::max() };
9+
810
int main()
911
{
1012
test_result result;
@@ -40,7 +42,7 @@ int main()
4042
expect_lt(limits_::max(), limits_::quiet_NaN());
4143
expect_neq(limits_::lowest() + 1, limits_::quiet_NaN());
4244

43-
expect_neq(as_fixed(limits_::max().v - 65536) + 1_fix, limits_::quiet_NaN());
45+
expect_neq(as_fixed(msvc_nonsense_non_constexpr_fix_max_.v - 65536) + 1_fix, limits_::quiet_NaN());
4446

4547
expect( test_resulting_type<fixed_t>( int64_t(1) + 1_fix ) );
4648
expect( test_resulting_type<fixed_t>( 1_fix + int64_t(1) ) );

unit_tests/atan_ut.cc

+6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ int main()
5050
return {};
5151
};
5252
result |= run_runtime_test(fn_tmpl);
53+
#if !defined(_MSC_VER) || defined(__clang__)
54+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
5355
result |= run_consteval_test(fn_tmpl);
56+
#endif
5457
};
5558

5659
"atan2"_test = [&result]
@@ -383,7 +386,10 @@ int main()
383386
return {};
384387
};
385388
result |= run_runtime_test(fn_tmpl);
389+
#if !defined(_MSC_VER) || defined(__clang__)
390+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
386391
result |= run_consteval_test(fn_tmpl);
392+
#endif
387393
};
388394
}
389395

unit_tests/misc_functions_ut.cc

+3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ int main()
4444
return {};
4545
};
4646
result |= run_runtime_test(fn_tmpl);
47+
#if !defined(_MSC_VER) || defined(__clang__)
48+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
4749
result |= run_consteval_test(fn_tmpl);
50+
#endif
4851
};
4952

5053
"angle_to_radians"_test = [&result]

unit_tests/sin_cos_ut.cc

+6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ int main()
7272
return {};
7373
};
7474
result |= run_runtime_test(fn_tmpl);
75+
#if !defined(_MSC_VER) || defined(__clang__)
76+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
7577
result |= run_consteval_test(fn_tmpl);
78+
#endif
7679
};
7780

7881
"cos"_test = [&result]
@@ -97,7 +100,10 @@ int main()
97100
return {};
98101
};
99102
result |= run_runtime_test(fn_tmpl);
103+
#if !defined(_MSC_VER) || defined(__clang__)
104+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
100105
result |= run_consteval_test(fn_tmpl);
106+
#endif
101107
};
102108
}
103109

unit_tests/subtraction_ut.cc

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ int main()
5555
return {};
5656
};
5757
result |= run_runtime_test(fn_tmpl);
58+
#if !defined(_MSC_VER) || defined(__clang__)
59+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
5860
result |= run_consteval_test(fn_tmpl);
61+
#endif
5962
};
6063
}

unit_tests/tan_ut.cc

+3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ int main()
3030
return {};
3131
};
3232
result |= run_runtime_test(fn_tmpl);
33+
#if !defined(_MSC_VER) || defined(__clang__)
34+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
3335
result |= run_consteval_test(fn_tmpl);
36+
#endif
3437
};
3538
}
3639

unit_tests/type_convertions_ut.cc

+6
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ int main()
8989
return {};
9090
};
9191
result |= run_runtime_test(fn_tmpl);
92+
#if !defined(_MSC_VER) || defined(__clang__)
93+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
9294
result |= run_consteval_test(fn_tmpl);
95+
#endif
9396
};
9497
"fixed_to_arithmetic floating point"_test = [&result]
9598
{
@@ -123,6 +126,9 @@ int main()
123126
return {};
124127
};
125128
result |= run_runtime_test(fn_tmpl);
129+
#if !defined(_MSC_VER) || defined(__clang__)
130+
// skip msvc toolset undebugable nonsense consteval errors for completely valid code
126131
result |= run_consteval_test(fn_tmpl);
132+
#endif
127133
};
128134
}

0 commit comments

Comments
 (0)