tests are showing that something broke with ctak. Tracing

This commit is contained in:
Danny Yoo 2011-07-01 09:48:09 -04:00
parent 49a7be479d
commit 523fa09071
2 changed files with 12 additions and 6 deletions

View File

@ -16,6 +16,7 @@
racket/runtime-path racket/runtime-path
racket/runtime-path racket/runtime-path
(for-syntax racket/base (for-syntax racket/base
racket/path
racket/port)) racket/port))
(define evaluate (make-evaluate (define evaluate (make-evaluate
@ -62,14 +63,19 @@ EOF
(define-syntax (test stx) (define-syntax (test stx)
(syntax-case stx () (syntax-case stx ()
[(_ source-file-path expected-file-path) [(_ original-source-file-path expected-file-path)
(with-syntax ([stx stx] (with-syntax ([stx stx]
[exp (call-with-input-file (syntax-e #'expected-file-path) [source-file-path (parameterize ([current-directory
port->string)]) (current-load-relative-directory)])
(normalize-path (syntax-e #'original-source-file-path)))]
[exp (parameterize ([current-directory
(current-load-relative-directory)])
(call-with-input-file (syntax-e #'expected-file-path)
port->string))])
(quasisyntax/loc #'stx (quasisyntax/loc #'stx
(begin (begin
(printf "running test on ~s..." source-file-path) (printf "running test on ~s..." original-source-file-path)
(let* ([src-path (normalize-path source-file-path)] (let* ([src-path source-file-path]
[result (evaluate (make-MainModuleSource (make-ModuleSource src-path)))] [result (evaluate (make-MainModuleSource (make-ModuleSource src-path)))]
[output (evaluated-stdout result)]) [output (evaluated-stdout result)])
(cond [(string=? output exp) (cond [(string=? output exp)

View File

@ -3,4 +3,4 @@
(require "../browser-harness.rkt") (require "../browser-harness.rkt")
(test "hello.rkt" "hello.expected") (test "hello.rkt" "hello.expected")
(test "simple-structs.rkt" "simple-structs.expected") #;(test "simple-structs.rkt" "simple-structs.expected")