Skip to content

Commit 25dfbce

Browse files
authored
Merge pull request #239 from Flamefire/test-duplication
Remove superflous test duplication
2 parents 3133adc + 8951db1 commit 25dfbce

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

test/test_parser.cpp

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <cstring>
1313
#include <cerrno>
1414

15-
template <typename T>
1615
void test_integer()
1716
{
1817
std::uint64_t significand {};
@@ -84,8 +83,7 @@ void test_integer()
8483
BOOST_TEST(r6.ec == std::errc::result_out_of_range);
8584
}
8685

87-
template <typename T>
88-
void test_scientifc()
86+
void test_scientific()
8987
{
9088
std::uint64_t significand {};
9189
std::int64_t exponent {};
@@ -146,7 +144,6 @@ void test_scientifc()
146144

147145
}
148146

149-
template <typename T>
150147
void test_hex_integer()
151148
{
152149
std::uint64_t significand {};
@@ -175,7 +172,6 @@ void test_hex_integer()
175172
BOOST_TEST(r3.ec == std::errc::invalid_argument);
176173
}
177174

178-
template <typename T>
179175
void test_hex_scientific()
180176
{
181177
std::uint64_t significand {};
@@ -236,21 +232,10 @@ void test_zeroes()
236232

237233
int main()
238234
{
239-
test_integer<float>();
240-
test_integer<double>();
241-
test_integer<long double>();
242-
243-
test_scientifc<float>();
244-
test_scientifc<double>();
245-
test_scientifc<long double>();
246-
247-
test_hex_integer<float>();
248-
test_hex_integer<double>();
249-
test_hex_integer<long double>();
250-
251-
test_hex_scientific<float>();
252-
test_hex_scientific<double>();
253-
test_hex_scientific<long double>();
235+
test_integer();
236+
test_scientific();
237+
test_hex_integer();
238+
test_hex_scientific();
254239

255240
test_zeroes();
256241
return boost::report_errors();

0 commit comments

Comments
 (0)