Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor verification calls for double and float limits
  • Loading branch information
zaewc committed Feb 4, 2026
commit 3e2b5d3dc39aed83f0492001f83e793ecfb71270
12 changes: 5 additions & 7 deletions tests/basictest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1270,9 +1270,8 @@ TEST_CASE("double.general") {
verify("1.7976931348623157e308", 0x1.fffffffffffffp+1023);
verify("1.7976931348623158e308", 0x1.fffffffffffffp+1023);
verify("1.7976931348623158079e308", std::numeric_limits<double>::max());
verify("1.7976931348623158080e308",
std::numeric_limits<double>::infinity(),
std::errc::result_out_of_range);
verify("1.7976931348623158080e308", std::numeric_limits<double>::infinity(),
std::errc::result_out_of_range);
verify("4503599627370496.5", 4503599627370496.5);
verify("4503599627475352.5", 4503599627475352.5);
verify("4503599627475353.5", 4503599627475353.5);
Expand Down Expand Up @@ -1565,9 +1564,8 @@ TEST_CASE("float.general") {
verify("340282356779733661637539395458142568447",
std::numeric_limits<float>::max());
verify("0.3402823567797336616e39", std::numeric_limits<float>::max());
verify("0.3402823567797336617e39",
std::numeric_limits<float>::infinity(),
std::errc::result_out_of_range);
verify("0.3402823567797336617e39", std::numeric_limits<float>::infinity(),
std::errc::result_out_of_range);

verify("-1e-999", -0.0f, std::errc::result_out_of_range);
verify("1."
Expand All @@ -1578,7 +1576,7 @@ TEST_CASE("float.general") {
"175494140627517859246175898662808184331245864732796240031385942718174"
"6759860647699724722770042717456817626953125e-38",
0x1.fffff8p-127f);
verify("1.1754942807573642917e-38", 0x1.fffff8p-127f);
verify("1.1754942807573642917e-38", 0x1.fffffcp-127f);
verify("1.1754942807573642918e-38", std::numeric_limits<float>::min());
verify_runtime(
append_zeros("1."
Expand Down