From 4489e78605418183f0d74d2cb81ce54e172eda0d Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 7 Dec 2018 03:54:00 +0000 Subject: [PATCH] There is no exact infinity or NaN, so #e should reject them. But we produce them anyway. --- tests/runtime/test-readwrite.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- 2.25.1