summaryrefslogtreecommitdiff
path: root/test/invalid-matrix.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-05-15 10:48:56 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-05-15 21:31:03 +0100
commit477df1f5504a507d0c5960aa7e21375284a6f99c (patch)
treedcceeba4c73edc8a9d9f979126d9f78c2f03d1f3 /test/invalid-matrix.c
parentf47a93ef30249b531e588335045d052c3dcc71bd (diff)
downloadcairo-477df1f5504a507d0c5960aa7e21375284a6f99c.tar.gz
[test] Clear expected floating point exceptions
test/invalid-matrix deliberately feeds garbage into the API to test our error detection. This causes FPE to be raised during the course of the test - so they are deliberately disable for the duration. However, the exceptions were not being cleared and so the FPE could be triggered on the next floating point operation. This was being masked during make check, by the fact that each test is run in its own forked process and was only observed when multiple tests were run in foreground mode.
Diffstat (limited to 'test/invalid-matrix.c')
-rw-r--r--test/invalid-matrix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/invalid-matrix.c b/test/invalid-matrix.c
index 933e81c9a..4fbda614b 100644
--- a/test/invalid-matrix.c
+++ b/test/invalid-matrix.c
@@ -363,6 +363,10 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \
CHECK_STATUS (status, "cairo_rotate(∞)");
cairo_destroy (cr2);
+#if HAVE_FECLEAREXCEPT
+ feclearexcept (FE_INVALID);
+#endif
+
return CAIRO_TEST_SUCCESS;
}