Skip to content

Commit 4ed4b02

Browse files
committed
Probabilistic test path
1 parent 4d81050 commit 4ed4b02

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_cmath.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,8 @@ void test_lrint()
802802
// Difference in rounding mode at 0.5
803803
if (abs(ret_dec) == abs(ret_val) + 1)
804804
{
805+
// LCOV_EXCL_START
806+
805807
float iptr;
806808
const auto frac = std::modf(val1, &iptr);
807809
if (abs(abs(frac) - 0.5F) < 0.01F)
@@ -810,11 +812,11 @@ void test_lrint()
810812
}
811813
else
812814
{
813-
// LCOV_EXCL_START
814815
std::cerr << "Frac: " << frac
815816
<< "\nDist: " << std::fabs(frac - 0.5F) / std::numeric_limits<float>::epsilon() << std::endl;
816-
// LCOV_EXCL_STOP
817817
}
818+
819+
// LCOV_EXCL_STOP
818820
}
819821

820822
if (!BOOST_TEST_EQ(ret_val, ret_dec))

0 commit comments

Comments
 (0)