Skip to content

Commit e4b010b

Browse files
committed
Fix test paths
1 parent 9332361 commit e4b010b

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

test/test_charconv_preservation.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,22 @@ void test_invalid_values(const std::array<T, N>& strings)
7070
}
7171
}
7272

73+
#ifdef _MSC_VER
74+
# pragma warning(push)
75+
# pragma warning(disable: 4127)
76+
#endif
77+
7378
template <typename T, std::size_t N>
7479
void test_invalid_to_chars(const std::array<T, N>& decimals)
7580
{
76-
for (std::size_t i {}; i < decimals.size(); ++i)
81+
BOOST_DECIMAL_IF_CONSTEXPR (detail::is_fast_type_v<T>)
7782
{
78-
char buffer[64] {};
79-
const auto r {to_chars(buffer, buffer + sizeof(buffer), decimals[i], chars_format::cohort_preserving_scientific)};
80-
BOOST_TEST(!r);
83+
for (std::size_t i {}; i < decimals.size(); ++i)
84+
{
85+
char buffer[64] {};
86+
const auto r {to_chars(buffer, buffer + sizeof(buffer), decimals[i], chars_format::cohort_preserving_scientific)};
87+
BOOST_TEST(!r);
88+
}
8189
}
8290

8391
for (std::size_t i {}; i < decimals.size(); ++i)
@@ -88,6 +96,10 @@ void test_invalid_to_chars(const std::array<T, N>& decimals)
8896
}
8997
}
9098

99+
#ifdef _MSC_VER
100+
# pragma warning(pop)
101+
#endif
102+
91103
template <typename T>
92104
const std::array<T, 7> decimals = {
93105
T{3, 2},

0 commit comments

Comments
 (0)