Skip to content

Commit 73d8d02

Browse files
FtZPetruskaslouken
authored andcommitted
Test: Fix Exp base case for Win32.
Add epsilon to the check.
1 parent 8e78287 commit 73d8d02

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/testautomation_math.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -1063,9 +1063,10 @@ static int
10631063
exp_baseCase(void *args)
10641064
{
10651065
const double result = SDL_exp(1.0);
1066-
SDLTest_AssertCheck(EULER == result,
1067-
"Exp(%f), expected %f, got %f",
1068-
1.0, EULER, result);
1066+
SDLTest_AssertCheck(result >= EULER - EPSILON &&
1067+
result <= EULER + EPSILON,
1068+
"Exp(%f), expected [%f,%f], got %f",
1069+
1.0, EULER - EPSILON, EULER + EPSILON, result);
10691070
return TEST_COMPLETED;
10701071
}
10711072

0 commit comments

Comments
 (0)