mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 07:38:22 +02:00
Tests/invalid-matrix: Also mask FE_OVERFLOW (_EM_OVERFLOW)
On Windows SDK <= 10.0.22621.0 (as we currently have in CI), INFINITY is defined as a compound expression that overflows at runtime. From Windows SDK 10.0.26100.0 onwards, INFINITY is defined as a literal expression (double) cast'ed to float. That doesn't trigger the overflow at runtime. The previous behavior can be retained by defining _UCRT_LEGACY_INFINITY.
This commit is contained in:
parent
21242ae5df
commit
6535ef2bcf
1 changed files with 3 additions and 3 deletions
|
|
@ -73,9 +73,9 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \
|
|||
|
||||
/* clear floating point exceptions (added by cairo_test_init()) */
|
||||
#if HAVE_FEDISABLEEXCEPT
|
||||
fedisableexcept (FE_INVALID);
|
||||
fedisableexcept (FE_INVALID | FE_OVERFLOW);
|
||||
#elif defined (_WIN32)
|
||||
_controlfp_s (NULL, _EM_INVALID, _EM_INVALID);
|
||||
_controlfp_s (NULL, _EM_INVALID | _EM_OVERFLOW, _EM_INVALID | _EM_OVERFLOW);
|
||||
#endif
|
||||
|
||||
/* create a bogus matrix and check results of attempted inversion */
|
||||
|
|
@ -369,7 +369,7 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \
|
|||
cairo_destroy (cr2);
|
||||
|
||||
#if FE_ALL_EXCEPT
|
||||
feclearexcept (FE_INVALID);
|
||||
feclearexcept (FE_INVALID | FE_OVERFLOW);
|
||||
#endif
|
||||
|
||||
return CAIRO_TEST_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue