Skip to content

Commit

Permalink
Merge pull request #239 from Flamefire/test-duplication
Browse files Browse the repository at this point in the history
Remove superflous test duplication
  • Loading branch information
mborland authored Jan 3, 2025
2 parents 3133adc + 8951db1 commit 25dfbce
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions test/test_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <cstring>
#include <cerrno>

template <typename T>
void test_integer()
{
std::uint64_t significand {};
Expand Down Expand Up @@ -84,8 +83,7 @@ void test_integer()
BOOST_TEST(r6.ec == std::errc::result_out_of_range);
}

template <typename T>
void test_scientifc()
void test_scientific()
{
std::uint64_t significand {};
std::int64_t exponent {};
Expand Down Expand Up @@ -146,7 +144,6 @@ void test_scientifc()

}

template <typename T>
void test_hex_integer()
{
std::uint64_t significand {};
Expand Down Expand Up @@ -175,7 +172,6 @@ void test_hex_integer()
BOOST_TEST(r3.ec == std::errc::invalid_argument);
}

template <typename T>
void test_hex_scientific()
{
std::uint64_t significand {};
Expand Down Expand Up @@ -236,21 +232,10 @@ void test_zeroes()

int main()
{
test_integer<float>();
test_integer<double>();
test_integer<long double>();

test_scientifc<float>();
test_scientifc<double>();
test_scientifc<long double>();

test_hex_integer<float>();
test_hex_integer<double>();
test_hex_integer<long double>();

test_hex_scientific<float>();
test_hex_scientific<double>();
test_hex_scientific<long double>();
test_integer();
test_scientific();
test_hex_integer();
test_hex_scientific();

test_zeroes();
return boost::report_errors();
Expand Down

0 comments on commit 25dfbce

Please sign in to comment.