From a3e8d1c956d89ef4a01c6248962f959f4bbacb1a Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 13 Nov 2018 07:25:36 +0000 Subject: [PATCH] Skip floating-point trap tests if the host doesn't support them. --- tests/microcode/test-flonum-except.scm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/microcode/test-flonum-except.scm b/tests/microcode/test-flonum-except.scm index 2eb0a1608..3cbaa4271 100644 --- a/tests/microcode/test-flonum-except.scm +++ b/tests/microcode/test-flonum-except.scm @@ -68,12 +68,15 @@ USA. (flo:preserving-environment (lambda () (flo:clear-exceptions! (flo:supported-exceptions)) - (flo:with-exceptions-untrapped (flo:supported-exceptions) - (lambda () - (with-failure-expected xfail? - (lambda () - (assertion (procedure)) - (assert-nonzero (flo:test-exceptions exception))))))))))) + ((lambda (body) + (if (flo:have-trap-enable/disable?) + (flo:with-exceptions-untrapped (flo:supported-exceptions) body) + (body))) + (lambda () + (with-failure-expected xfail? + (lambda () + (assertion (procedure)) + (assert-nonzero (flo:test-exceptions exception))))))))))) (define (define-exception-trap-test name excname exception condition-type procedure #!optional xfail?) @@ -81,7 +84,10 @@ USA. (lambda () (flo:preserving-environment (lambda () - (with-failure-expected xfail? + (with-failure-expected + (if (flo:have-trap-enable/disable?) + xfail? + 'xerror) (lambda () (assert-error (lambda () -- 2.25.1