From 58fd501961dec0083288be1f6c3e0f8de5e7ab3a Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 7 Dec 2018 04:45:33 +0000 Subject: [PATCH] More tests for signed NaN notation. Only the positive quiet NaN with payload 0 is read/write invariant so far. --- tests/runtime/test-readwrite.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/runtime/test-readwrite.scm b/tests/runtime/test-readwrite.scm index 2bad4a20f..7549078ee 100644 --- a/tests/runtime/test-readwrite.scm +++ b/tests/runtime/test-readwrite.scm @@ -92,6 +92,8 @@ USA. ("-inf.0" ,assert-inf-) ("inf.0" ,assert-symbol) ("nan.0" ,assert-symbol) + ("+nan.0" ,assert-nan) + ("-nan.0" ,assert-nan ,expect-failure) ("123" ,assert-exact-integer) ("1/34" ,assert-exact-rational) ("123+456i" ,assert-complex-nonreal) @@ -115,6 +117,8 @@ USA. ("-inf.0-inf.0i" ,assert-complex-nonreal) ("+inf.0+nan.0i" ,assert-complex-nonreal) ("+nan.0+inf.0i" ,assert-complex-nonreal) + ("+inf.0-nan.0i" ,assert-complex-nonreal ,expect-failure) + ("-nan.0+inf.0i" ,assert-complex-nonreal ,expect-failure) ("\"|\"" ,assert-string) ("\"\\\"\"" ,assert-string) ("\"\\\\\"" ,assert-string) @@ -133,6 +137,8 @@ USA. ("-inf.0" ,assert-inf-) ("inf.0" ,assert-symbol) ("nan.0" ,assert-symbol) + ("+nan.0" ,assert-nan) + ("-nan.0" ,assert-nan ,expect-failure) ("#x123" ,assert-exact-integer) ("#x1/34" ,assert-exact-rational) ("#x123+456i" ,assert-complex-nonreal) @@ -159,7 +165,9 @@ USA. ("#x-inf.0+inf.0i" ,assert-complex-nonreal) ("#x-inf.0-inf.0i" ,assert-complex-nonreal) ("#x+inf.0+nan.0i" ,assert-complex-nonreal) - ("#x+nan.0+inf.0i" ,assert-complex-nonreal)) + ("#x+nan.0+inf.0i" ,assert-complex-nonreal) + ("#x+inf.0-nan.0i" ,assert-complex-nonreal ,expect-failure) + ("#x-nan.0+inf.0i" ,assert-complex-nonreal ,expect-failure)) (lambda (string #!optional assertion xfail) (with-expected-failure xfail (lambda () -- 2.25.1