From: Taylor R Campbell Date: Wed, 28 Nov 2018 05:15:41 +0000 (+0000) Subject: Test compilation of flonum comparisons both ways. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~154 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c8696e68606b6918a904689cac367bcb68d861c0;p=mit-scheme.git Test compilation of flonum comparisons both ways. --- diff --git a/tests/runtime/test-flonum.scm b/tests/runtime/test-flonum.scm index f0cd3b48d..883f46a1c 100644 --- a/tests/runtime/test-flonum.scm +++ b/tests/runtime/test-flonum.scm @@ -210,7 +210,24 @@ USA. (yes-traps (lambda () (not (safe-compare x y)))) (if (or (flo:nan? x) (flo:nan? y)) #t - (not (unsafe-compare x y)))))) + (not (unsafe-compare x y)))) + (if (safe-compare x y) + (begin + (assert-true (not (flo:nan? x))) + (assert-true (not (flo:nan? y))) + (assert-true (unsafe-compare x y)))) + (if (not (safe-compare x y)) + (begin + (assert-true + (or (flo:nan? x) + (flo:nan? y) + (not (unsafe-compare x y)))))) + (if (not (or (flo:nan? x) (flo:nan? y))) + (begin + (if (unsafe-compare x y) + (assert-true (safe-compare x y))) + (if (not (unsafe-compare x y)) + (assert-false (unsafe-compare x y))))))) cases)) cases)))))