consolidate untyped tests

pull/2/head
Matthew Butterick 10 years ago
parent 763e54f6d2
commit 4ca5e027f2

@ -7,19 +7,13 @@
(with-syntax ([sym (generate-temporary)]) (with-syntax ([sym (generate-temporary)])
#'(begin #'(begin
(module sym racket (module sym racket
(require rackunit txexpr) (require rackunit "main.rkt")
exprs ...) exprs ...)
(require 'sym)))])) (require 'sym)
(module sym2 racket
(define-syntax (eval-as-untyped-safe stx) (require rackunit (submod "main.rkt" safe))
(syntax-case stx ()
[(_ exprs ...)
(with-syntax ([sym (generate-temporary)])
#'(begin
(module sym racket
(require rackunit (submod txexpr safe))
exprs ...) exprs ...)
(require 'sym)))])) (require 'sym2)))]))
(define-syntax (eval-as-typed stx) (define-syntax (eval-as-typed stx)
(syntax-case stx () (syntax-case stx ()
@ -27,15 +21,14 @@
(with-syntax ([sym (generate-temporary)]) (with-syntax ([sym (generate-temporary)])
#'(begin #'(begin
(module sym typed/racket (module sym typed/racket
(require typed/rackunit typed/txexpr) (require typed/rackunit "../typed/txexpr.rkt")
exprs ...) exprs ...)
(require 'sym)))])) (require 'sym)))]))
(define-syntax-rule (eval-as-typed-and-untyped exprs ...) (define-syntax-rule (eval-as-typed-and-untyped exprs ...)
(begin (begin
(eval-as-typed exprs ...) (eval-as-typed exprs ...)
(eval-as-untyped exprs ...) (eval-as-untyped exprs ...)))
(eval-as-untyped-safe exprs ...)))
(eval-as-typed-and-untyped (eval-as-typed-and-untyped

Loading…
Cancel
Save