More tests for signed NaN notation.
authorTaylor R Campbell <campbell@mumble.net>
Fri, 7 Dec 2018 04:45:33 +0000 (04:45 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Fri, 7 Dec 2018 17:17:28 +0000 (17:17 +0000)
Only the positive quiet NaN with payload 0 is read/write invariant so
far.

tests/runtime/test-readwrite.scm

index 2bad4a20ffff04755acf36e9d997129201ee2f6a..7549078ee614766ee84b99482e88ae98a76d5932 100644 (file)
@@ -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 ()