Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Use the right overload of std::nextafter in tests

Commit
28663fb9594ae60109255625d8e6020a36331105
Author
Martin Hořeňovský ·
Parents
d2d418a9cbda

Files · Download .tar.gz

Changes

 projects/SelfTest/UsageTests/Matchers.tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projects/SelfTest/UsageTests/Matchers.tests.cpp b/projects/SelfTest/UsageTests/Matchers.tests.cpp
index ae05a73c..9917bd78 100644
--- a/projects/SelfTest/UsageTests/Matchers.tests.cpp
+++ b/projects/SelfTest/UsageTests/Matchers.tests.cpp
@@ -348,7 +348,7 @@ namespace { namespace MatchersTests {
                     auto v1 = std::numeric_limits<float>::min();
                     auto v2 = v1;
                     for (int i = 0; i < 5; ++i) {
-                        v2 = std::nextafter(v1, 0);
+                        v2 = std::nextafter(v1, 0.f);
                     }
                     REQUIRE_THAT(v1, WithinRel(v2));
                 }