From fb70969f1a74a76197297f84eb4bcb137c57644e Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 22 Apr 2014 17:24:34 -0400 Subject: [PATCH] Add single flonums to TR random testing. original commit: 4c19f273cd785929ef84d6c2020ffd3115fcb387 --- .../tests/typed-racket/tr-random-testing.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/tr-random-testing.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/tr-random-testing.rkt index 672d71db..619250d7 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/tr-random-testing.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/tr-random-testing.rkt @@ -22,7 +22,7 @@ [n real] ;; randomly generate F, not E, because literal numbers self-evaluate ;; (i.e. generates a useless test) - [E* n E F I] + [E* n E F S I] ;; racket/math ;; [E (degrees->radians E) ;; (radians->degrees E) @@ -81,6 +81,10 @@ (unsafe-fl- F* F*) (unsafe-fl* F* F*) (unsafe-fl/ F* F*)] + ;; not many single-flonum-specific ops, so will mostly be used in E context + [S (real->single-flonum n) + (inexact->exact S) + (real->double-flonum S)] ;; more likely to be integers [I* (exact-round n) I] ; TODO fix pre-processing to avoid cast [I (* I* ...)