Add IsNaN matcher

This commit is contained in:
Martin Hořeňovský
2023-02-26 00:14:32 +01:00
parent 9ff3cde87b
commit 6fbb3f0723
17 changed files with 178 additions and 21 deletions

View File

@@ -4671,6 +4671,18 @@ Matchers.tests.cpp:<line number>: PASSED:
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_THROWS_AS( WithinRel( 1., 1. ), std::domain_error )
-------------------------------------------------------------------------------
Floating point matchers: double
IsNaN
-------------------------------------------------------------------------------
Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( 1., !IsNaN() )
with expansion:
1.0 not is NaN
-------------------------------------------------------------------------------
Floating point matchers: float
Relative
@@ -4864,6 +4876,18 @@ Matchers.tests.cpp:<line number>: PASSED:
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_THROWS_AS( WithinRel( 1.f, 1.f ), std::domain_error )
-------------------------------------------------------------------------------
Floating point matchers: float
IsNaN
-------------------------------------------------------------------------------
Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( 1., !IsNaN() )
with expansion:
1.0 not is NaN
-------------------------------------------------------------------------------
Generators -- adapters
Filtering by predicate
@@ -18208,5 +18232,5 @@ Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 409 | 309 passed | 84 failed | 5 skipped | 11 failed as expected
assertions: 2224 | 2047 passed | 145 failed | 32 failed as expected
assertions: 2226 | 2049 passed | 145 failed | 32 failed as expected