Minimal tests for when extflonum are no available

Racket has a minimal support to read and write `extflonum`s when the `exflonums`
are not available. In this configuration they use a different path code, so it's
necessary to test this version of the code too.
This commit is contained in:
Gustavo Massaccesi 2015-01-25 12:42:29 -03:00 committed by Matthew Flatt
parent fa00d01b6f
commit 488029b952
2 changed files with 12 additions and 0 deletions

View File

@ -12,6 +12,7 @@
(load-in-sandbox "dict.rktl") (load-in-sandbox "dict.rktl")
(load-in-sandbox "fixnum.rktl") (load-in-sandbox "fixnum.rktl")
(load-in-sandbox "flonum.rktl") (load-in-sandbox "flonum.rktl")
(load-in-sandbox "extflonum.rktl")
(load-in-sandbox "string.rktl") (load-in-sandbox "string.rktl")
(load-in-sandbox "async-channel.rktl") (load-in-sandbox "async-channel.rktl")

View File

@ -6,6 +6,17 @@
(require racket/extflonum (require racket/extflonum
"for-util.rkt") "for-util.rkt")
; minimal tests for when extflonum are no available
(test "+inf.t" format "~a" +inf.t)
(test "-inf.t" format "~a" -inf.t)
(test "+nan.t" format "~a" +nan.t)
(test "7.0t0" format "~a" 007.000t000)
(test "-7.0t0" format "~a" -007.000t000)
(test #t extflonum? 7.t0)
(test #f extflonum? 7.0)
(test #f number? 7.t0)
(test #t number? 7.0)
(when (extflonum-available?) (when (extflonum-available?)
;; ---------------------------------------- ;; ----------------------------------------