Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8eb4013

Browse files
Use Approx() macro for fuzzy comparison
1 parent 129ae52 commit 8eb4013

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎test/src/Stream/test_parseFloat.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ TEST_CASE ("Testing parseFloat(LookaheadMode lookahead = SKIP_ALL, char ignore =
4848
WHEN ("A float is provided with too many digits")
4949
{
5050
mock << "3.1415926535897932384";
51-
REQUIRE(abs(mock.parseFloat() - 3.141592654f) < 8 * FLT_EPSILON);
51+
REQUIRE(mock.parseFloat() == Approx(3.141592654f));
5252
}
5353
}
5454

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /