From: Arthur A. Gleckler Date: Thu, 2 Sep 2010 06:56:41 +0000 (-0700) Subject: Added tests for infinities. X-Git-Tag: 20101212-Gtk~67 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=95990504392d6402f2729e82a4cc3ebed54b0cba;p=mit-scheme.git Added tests for infinities. --- 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?