Special case Approx(inf) to better follow user expectations

This commit is contained in:
Martin Hořeňovský committed 2019-10-04 13:28:43 +02:00
1 parent 815f99541d
commit 02ee130bd0
7 files changed
+12 -77

No files matched your search

@@ -61,8 +61,6 @@ TEST_CASE( "Some simple comparisons between doubles", "[Approx]" ) {
REQUIRE( Approx( d ) == 1.23 );
REQUIRE( Approx( d ) != 1.22 );
REQUIRE( Approx( d ) != 1.24 );
REQUIRE(INFINITY == Approx(INFINITY));
}
///////////////////////////////////////////////////////////////////////////////
@@ -183,8 +181,10 @@ TEST_CASE("Epsilon only applies to Approx's value", "[Approx]") {
REQUIRE(101.01 != Approx(100).epsilon(0.01));
}
TEST_CASE("Assorted miscellaneous tests", "[Approx]") {
TEST_CASE("Assorted miscellaneous tests", "[Approx][approvals]") {
REQUIRE(INFINITY == Approx(INFINITY));
REQUIRE(-INFINITY != Approx(INFINITY));
REQUIRE(1 != Approx(INFINITY));
REQUIRE(NAN != Approx(NAN));
REQUIRE_FALSE(NAN == Approx(NAN));
}