From: Chris Hanson Date: Thu, 3 May 2018 06:08:03 +0000 (-0700) Subject: Update to reflect changes in runtime system. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~78 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bafe60c3e74bbd4bd7d4db1d8d5de20c4a897bb1;p=mit-scheme.git Update to reflect changes in runtime system. --- diff --git a/tests/runtime/test-arith.scm b/tests/runtime/test-arith.scm index 4557444be..7652187b8 100644 --- a/tests/runtime/test-arith.scm +++ b/tests/runtime/test-arith.scm @@ -28,16 +28,9 @@ USA. (declare (usual-integrations)) -;;; XXX The nonsense about IDENTITY-PROCEDURE here serves to fake -;;; out bogus constant-folding which needs to be fixed in SF (and -;;; probably LIAR too). - -(define (zero) - (identity-procedure 0.)) - (define (assert-nan object) (assert-true (flo:flonum? object)) - (assert-false (flo:= object object))) + (assert-true (flo:nan? object))) (define (define-enumerated-test prefix elements procedure) (let ((n (vector-length elements))) @@ -66,78 +59,60 @@ USA. (define-enumerated^2-test 'ZEROS-ARE-EQUAL (vector -0. 0 +0.) =) -(if (flo:have-trap-enable/disable?) - (let () - - (define (nan) - (flo:with-exceptions-untrapped (flo:exception:invalid-operation) - (lambda () - (flo:/ (zero) (zero))))) - - (define (inf+) - (flo:with-exceptions-untrapped (flo:exception:divide-by-zero) - (lambda () - (flo:/ +1. (zero))))) - - (define (inf-) - (flo:with-exceptions-untrapped (flo:exception:divide-by-zero) - (lambda () - (flo:/ -1. (zero))))) - - (define-enumerated^2-test* 'ORDER-WITH-INFINITIES - (vector (inf-) -2. -1 -0.5 0 +0.5 +1 +2. (inf+)) +(define-enumerated^2-test* 'ORDER-WITH-INFINITIES + (vector (flo:-inf.0) -2. -1 -0.5 0 +0.5 +1 +2. (flo:+inf.0)) (lambda (i vi j vj) (if (< i j) (assert-true (< vi vj)) (assert-false (< vi vj))))) - (let ((elements (vector (inf-) -2. -1 -0. 0 +0. +1 +2. (inf+)))) +(let ((elements (vector (flo:-inf.0) -2. -1 -0. 0 +0. +1 +2. (flo:+inf.0)))) (define-enumerated-test '!NAN