From: Taylor R Campbell Date: Tue, 13 Nov 2018 07:25:36 +0000 (+0000) Subject: Skip floating-point trap tests if the host doesn't support them. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~101 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a3e8d1c956d89ef4a01c6248962f959f4bbacb1a;p=mit-scheme.git Skip floating-point trap tests if the host doesn't support them. --- 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 ()