From: Taylor R Campbell Date: Fri, 7 Dec 2018 03:54:00 +0000 (+0000) Subject: There is no exact infinity or NaN, so #e should reject them. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~47 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4489e78605418183f0d74d2cb81ce54e172eda0d;p=mit-scheme.git There is no exact infinity or NaN, so #e should reject them. But we produce them anyway. --- diff --git a/tests/runtime/test-readwrite.scm b/tests/runtime/test-readwrite.scm index 691a069b2..17a41687d 100644 --- a/tests/runtime/test-readwrite.scm +++ b/tests/runtime/test-readwrite.scm @@ -178,4 +178,14 @@ USA. (lambda (string assertion #!optional xfail) (with-expected-failure xfail (lambda () - (assertion (read-from-string string)))))) \ No newline at end of file + (assertion (read-from-string string)))))) + +(define-enumerated-test 'read-error + `(("#e+nan.0" ,expect-failure) + ("#e-nan.0" ,expect-failure) + ("#e+inf.0" ,expect-failure) + ("#e-inf.0" ,expect-failure)) + (lambda (string #!optional xfail) + (with-expected-failure xfail + (lambda () + (assert-error (lambda () (read-from-string string))))))) \ No newline at end of file