test: fix tests on mips
Mips has a different way of handling NaN. This makes sure the tests pass on MIPS as well.
This partially fix-es #20336 (closed) (the - is there to prevent github to close the issue).
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines