diff --git a/collects/tests/typed-scheme/optimizer/generic/different-langs.rkt b/collects/tests/typed-scheme/optimizer/generic/different-langs.rkt new file mode 100644 index 00000000..9754b392 --- /dev/null +++ b/collects/tests/typed-scheme/optimizer/generic/different-langs.rkt @@ -0,0 +1,4 @@ +;; to see if the harness supports having the 2 versions of a test being +;; written in different languages +(module different-langs typed/scheme #:optimize + (+ 1 2)) diff --git a/collects/tests/typed-scheme/optimizer/run.rkt b/collects/tests/typed-scheme/optimizer/run.rkt index 1ff2c4c8..8bee3094 100644 --- a/collects/tests/typed-scheme/optimizer/run.rkt +++ b/collects/tests/typed-scheme/optimizer/run.rkt @@ -5,13 +5,17 @@ ;; we compare the expansion of automatically optimized and hand optimized ;; modules (define (read-and-expand file) - (syntax->datum - (parameterize ([current-namespace (make-base-namespace)]) - (with-handlers - ([exn:fail? (lambda (exn) - (printf "~a\n" (exn-message exn)) - #'#f)]) - (expand (with-input-from-file file read-syntax)))))) + ;; drop the "module", its name and its language, so that we can write the + ;; 2 versions of each test in different languages (typed and untyped) if + ;; need be + (cdddr + (syntax->datum + (parameterize ([current-namespace (make-base-namespace)]) + (with-handlers + ([exn:fail? (lambda (exn) + (printf "~a\n" (exn-message exn)) + #'(#f #f #f #f))]) ; for cdddr + (expand (with-input-from-file file read-syntax))))))) (define (test gen) (let-values (((base name _) (split-path gen)))