From 488029b952c26ea8ebcdc0b29807282b0bc941b7 Mon Sep 17 00:00:00 2001 From: Gustavo Massaccesi Date: Sun, 25 Jan 2015 12:42:29 -0300 Subject: [PATCH] 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. --- pkgs/racket-test-core/tests/racket/all.rktl | 1 + pkgs/racket-test-core/tests/racket/extflonum.rktl | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/pkgs/racket-test-core/tests/racket/all.rktl b/pkgs/racket-test-core/tests/racket/all.rktl index ca2862abbb..a0ce6a64db 100644 --- a/pkgs/racket-test-core/tests/racket/all.rktl +++ b/pkgs/racket-test-core/tests/racket/all.rktl @@ -12,6 +12,7 @@ (load-in-sandbox "dict.rktl") (load-in-sandbox "fixnum.rktl") (load-in-sandbox "flonum.rktl") +(load-in-sandbox "extflonum.rktl") (load-in-sandbox "string.rktl") (load-in-sandbox "async-channel.rktl") diff --git a/pkgs/racket-test-core/tests/racket/extflonum.rktl b/pkgs/racket-test-core/tests/racket/extflonum.rktl index 5e1d90418c..e1f9b635b5 100644 --- a/pkgs/racket-test-core/tests/racket/extflonum.rktl +++ b/pkgs/racket-test-core/tests/racket/extflonum.rktl @@ -6,6 +6,17 @@ (require racket/extflonum "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?) ;; ----------------------------------------