From 73d8d02629cee294fa01e4dbf04b6ba6230cd07d Mon Sep 17 00:00:00 2001 From: Pierre Wendling Date: Tue, 9 Aug 2022 22:36:59 -0400 Subject: [PATCH] Test: Fix Exp base case for Win32. Add epsilon to the check. --- test/testautomation_math.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/testautomation_math.c b/test/testautomation_math.c index 8e3d9e555..eee05dab2 100644 --- a/test/testautomation_math.c +++ b/test/testautomation_math.c @@ -1063,9 +1063,10 @@ static int exp_baseCase(void *args) { const double result = SDL_exp(1.0); - SDLTest_AssertCheck(EULER == result, - "Exp(%f), expected %f, got %f", - 1.0, EULER, result); + SDLTest_AssertCheck(result >= EULER - EPSILON && + result <= EULER + EPSILON, + "Exp(%f), expected [%f,%f], got %f", + 1.0, EULER - EPSILON, EULER + EPSILON, result); return TEST_COMPLETED; }