simplify test evaluators

pull/3/head
Matthew Butterick 10 years ago
parent 2a9e5e29d7
commit aea6c90b57

@ -1,13 +1,13 @@
#lang racket/base #lang racket
(require (for-syntax racket/base racket/syntax)) (require (for-syntax racket/syntax))
(define-syntax (eval-as-untyped stx) (define-syntax (eval-as-untyped stx)
(syntax-case stx () (syntax-case stx ()
[(_ exprs ...) [(_ exprs ...)
(with-syntax ([sym (generate-temporary)]) (with-syntax ([sym (generate-temporary)])
#'(begin #'(begin
(module sym racket/base (module sym racket
(require rackunit sugar net/url racket/list racket/set racket/match) (require rackunit sugar net/url)
exprs ...) exprs ...)
(require 'sym)))])) (require 'sym)))]))
@ -16,8 +16,8 @@
[(_ exprs ...) [(_ exprs ...)
(with-syntax ([sym (generate-temporary)]) (with-syntax ([sym (generate-temporary)])
#'(begin #'(begin
(module sym typed/racket/base (module sym typed/racket
(require typed/rackunit typed/sugar typed/net/url racket/list racket/list racket/set racket/match) (require typed/rackunit typed/sugar typed/net/url)
exprs ...) exprs ...)
(require 'sym)))])) (require 'sym)))]))

Loading…
Cancel
Save