mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-03 15:25:43 +00:00
testautomation: don't do float equality tests
(cherry picked from commit 474c8d0073b0fb4b14b65b79c7e620db1332e4f3)
This commit is contained in:
parent
f62d1220ac
commit
d1c5038f16
|
@ -76,7 +76,7 @@ helper_dtod(const char *func_name, d_to_d_func func,
|
||||||
Uint32 i;
|
Uint32 i;
|
||||||
for (i = 0; i < cases_size; i++) {
|
for (i = 0; i < cases_size; i++) {
|
||||||
const double result = func(cases[i].input);
|
const double result = func(cases[i].input);
|
||||||
SDLTest_AssertCheck(result == cases[i].expected,
|
SDLTest_AssertCheck((result - cases[i].expected) < FLT_EPSILON,
|
||||||
"%s(%f), expected %f, got %f",
|
"%s(%f), expected %f, got %f",
|
||||||
func_name,
|
func_name,
|
||||||
cases[i].input,
|
cases[i].input,
|
||||||
|
@ -1138,7 +1138,7 @@ log_baseCases(void *args)
|
||||||
1.0, 0.0, result);
|
1.0, 0.0, result);
|
||||||
|
|
||||||
result = SDL_log(EULER);
|
result = SDL_log(EULER);
|
||||||
SDLTest_AssertCheck(1.0 == result,
|
SDLTest_AssertCheck((result - 1.) < FLT_EPSILON,
|
||||||
"Log(%f), expected %f, got %f",
|
"Log(%f), expected %f, got %f",
|
||||||
EULER, 1.0, result);
|
EULER, 1.0, result);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue