flo:make-nan error reporting is busted.
authorTaylor R Campbell <campbell@mumble.net>
Fri, 7 Dec 2018 04:11:01 +0000 (04:11 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Fri, 7 Dec 2018 17:17:28 +0000 (17:17 +0000)
tests/runtime/test-flonum.scm

index fecc18054224d387ce228167cbf89ce648406692..92895ef7939ebeb1aae0626b6f537f606fa24edc 100644 (file)
@@ -1153,3 +1153,14 @@ USA.
                                  (lambda () (flo:logb x)))
     (assert-only-except/no-traps (flo:exception:invalid-operation)
                                  (lambda () (flo:logb (flo:negate x))))))
+
+(define-enumerated-test 'flo:make-nan/error
+  `((#f #f 0 ,expect-error)
+    (#t #f 0 ,expect-error))
+  (lambda (sign quiet? payload #!optional xfail)
+    (with-expected-failure xfail
+      (lambda ()
+        (assert-error
+         (lambda ()
+           (flo:make-nan sign quiet? payload))
+         (list condition-type:bad-range-argument))))))
\ No newline at end of file