From 95990504392d6402f2729e82a4cc3ebed54b0cba Mon Sep 17 00:00:00 2001 From: "Arthur A. Gleckler" Date: Wed, 1 Sep 2010 23:56:41 -0700 Subject: [PATCH] Added tests for infinities. --- tests/microcode/test-flonum-casts.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/microcode/test-flonum-casts.scm b/tests/microcode/test-flonum-casts.scm index 26ea17887..151ae110c 100644 --- a/tests/microcode/test-flonum-casts.scm +++ b/tests/microcode/test-flonum-casts.scm @@ -84,15 +84,15 @@ USA. -1.0 #*1011111111110000000000000000000000000000000000000000000000000000) - ;; We should add a procedure that tests for floating-point - ;; infinity and use it here. (let ((positive-infinity (integer-to-double #*0111111111110000000000000000000000000000000000000000000000000000))) + (assert-false (flo:finite? positive-infinity)) (assert-true (flo:positive? positive-infinity))) (let ((negative-infinity (integer-to-double #*1111111111110000000000000000000000000000000000000000000000000000))) + (assert-false (flo:finite? negative-infinity)) (assert-true (flo:negative? negative-infinity))) (assert-true @@ -138,14 +138,14 @@ USA. (test-single -1.0 #*10111111100000000000000000000000) - ;; We should add a procedure that tests for floating-point - ;; infinity and use it here. (let ((positive-infinity (integer-to-single #*01111111100000000000000000000000))) - (assert-true (flo:positive? positive-infinity))) + (assert-true (flo:positive? positive-infinity)) + (assert-false (flo:finite? positive-infinity))) (let ((negative-infinity (integer-to-single #*11111111100000000000000000000000))) - (assert-true (flo:negative? negative-infinity))) + (assert-true (flo:negative? negative-infinity)) + (assert-false (flo:finite? negative-infinity))) (assert-true (flo:nan? -- 2.25.1