moving tests to separate directory

This commit is contained in:
Danny Yoo 2011-05-20 10:48:44 -04:00
parent 1af88b30a8
commit 66e63ddb2c
15 changed files with 69 additions and 64 deletions

View File

@ -1,10 +1,10 @@
#lang racket #lang racket
(require "js-assembler/assemble.rkt" (require "../js-assembler/assemble.rkt"
"js-assembler/get-runtime.rkt" "../js-assembler/get-runtime.rkt"
"browser-evaluate.rkt" "../browser-evaluate.rkt"
"lexical-structs.rkt" "../lexical-structs.rkt"
"il-structs.rkt" "../il-structs.rkt"
racket/port racket/port
racket/promise racket/promise
racket/runtime-path) racket/runtime-path)

View File

@ -1,8 +1,8 @@
#lang racket #lang racket
(require "js-assembler/get-runtime.rkt" (require "../js-assembler/get-runtime.rkt"
"browser-evaluate.rkt" "../browser-evaluate.rkt"
"package.rkt" "../package.rkt")
racket/runtime-path)

View File

@ -1,8 +1,8 @@
#lang racket #lang racket
(require "simulator/simulator.rkt" (require "../simulator/simulator.rkt"
"simulator/simulator-structs.rkt" "../simulator/simulator-structs.rkt"
"simulator/simulator-helpers.rkt" "../simulator/simulator-helpers.rkt"
"test-helpers.rkt") "test-helpers.rkt")

View File

@ -1,8 +1,8 @@
#lang racket #lang racket
(require "simulator/simulator.rkt" (require "../simulator/simulator.rkt"
"simulator/simulator-structs.rkt" "../simulator/simulator-structs.rkt"
"simulator/simulator-helpers.rkt" "../simulator/simulator-helpers.rkt"
"test-helpers.rkt") "test-helpers.rkt")

View File

@ -1,11 +1,11 @@
#lang racket #lang racket
(require "browser-evaluate.rkt" (require "../browser-evaluate.rkt"
"package.rkt" "../package.rkt"
"js-assembler/get-runtime.rkt" "../js-assembler/get-runtime.rkt"
racket/port racket/port
racket/runtime-path) racket/runtime-path)
(define-runtime-path conform-path (build-path "tests" "conform")) (define-runtime-path conform-path (build-path "conform"))
(define evaluate (make-evaluate (define evaluate (make-evaluate

View File

@ -1,10 +1,13 @@
#lang racket #lang racket
(require "simulator/simulator.rkt" (require "../simulator/simulator.rkt"
"simulator/simulator-structs.rkt" "../simulator/simulator-structs.rkt"
"test-helpers.rkt") "test-helpers.rkt"
racket/runtime-path)
(define-runtime-path conform-path "conform")
;; run: machine -> (machine number) ;; run: machine -> (machine number)
;; Run the machine to completion. ;; Run the machine to completion.
@ -52,7 +55,7 @@
(printf "ok. ~s steps.\n\n" num-steps)))))])) (printf "ok. ~s steps.\n\n" num-steps)))))]))
(test (read (open-input-file "tests/conform/program0.sch")) (test (read (open-input-file (build-path conform-path "program0.sch")))
(port->string (open-input-file "tests/conform/expected0.txt")) (port->string (open-input-file (build-path conform-path "expected0.txt")))
;;#:debug? #t ;;#:debug? #t
) )

View File

@ -1,13 +1,13 @@
#lang racket #lang racket
(require "browser-evaluate.rkt" (require "../browser-evaluate.rkt"
"package.rkt" "../package.rkt"
"js-assembler/get-runtime.rkt" "../js-assembler/get-runtime.rkt"
racket/port racket/port
racket/runtime-path racket/runtime-path
racket/runtime-path racket/runtime-path
(for-syntax racket/base)) (for-syntax racket/base))
(define-runtime-path earley-file-path (build-path "tests" "earley")) (define-runtime-path earley-file-path (build-path "earley"))
(define evaluate (make-evaluate (define evaluate (make-evaluate

View File

@ -1,8 +1,11 @@
#lang racket #lang racket
(require "simulator/simulator.rkt" (require "../simulator/simulator.rkt"
"simulator/simulator-structs.rkt" "../simulator/simulator-structs.rkt"
"test-helpers.rkt") "test-helpers.rkt"
racket/runtime-path)
(define-runtime-path earley-file-path (build-path "earley"))
@ -52,6 +55,5 @@
(printf "ok. ~s steps.\n\n" num-steps)))))])) (printf "ok. ~s steps.\n\n" num-steps)))))]))
(test (read (open-input-file "tests/earley/earley.sch")) (test (read (open-input-file (build-path earley-path "earley.sch")))
(port->string (open-input-file "tests/earley/expected.txt")) (port->string (open-input-file (build-path earley-path "expected.txt"))))
)

View File

@ -1,16 +1,16 @@
#lang racket #lang racket
(require "get-dependencies.rkt" (require "../get-dependencies.rkt"
"get-module-bytecode.rkt" "../get-module-bytecode.rkt"
"parse-bytecode.rkt" "../parse-bytecode.rkt"
"lexical-structs.rkt" "../lexical-structs.rkt"
racket/path racket/path
racket/runtime-path racket/runtime-path
rackunit) rackunit)
(define-runtime-path this-path ".") (define-runtime-path compiler-path "..")
(define e (define e
(parse-bytecode (build-path this-path "get-dependencies.rkt"))) (parse-bytecode (build-path compiler-path "get-dependencies.rkt")))
(void (get-dependencies e)) (void (get-dependencies e))
(void (get-dependencies (void (get-dependencies
@ -50,7 +50,7 @@
(file "~a/get-module-bytecode.rkt")) (file "~a/get-module-bytecode.rkt"))
(exp 1)) (exp 1))
EOF EOF
(path->string (normalize-path this-path))) (path->string (normalize-path compiler-path)))
))))) )))))
module-name<) module-name<)
(sort (sort
@ -59,5 +59,5 @@ EOF
(make-ModuleName 'collects/racket/math.rkt (make-ModuleName 'collects/racket/math.rkt
(build-path collects-dir "racket" "math.rkt")) (build-path collects-dir "racket" "math.rkt"))
(make-ModuleName 'whalesong/get-module-bytecode.rkt (make-ModuleName 'whalesong/get-module-bytecode.rkt
(normalize-path (build-path this-path "get-module-bytecode.rkt")))) (normalize-path (build-path compiler-path "get-module-bytecode.rkt"))))
module-name<)) module-name<))

View File

@ -2,18 +2,18 @@
(require (prefix-in racket: racket/base) (require (prefix-in racket: racket/base)
racket/runtime-path racket/runtime-path
"compiler-structs.rkt" "../compiler-structs.rkt"
"compiler.rkt" "../compiler.rkt"
"parse-bytecode.rkt" "../parse-bytecode.rkt"
"get-module-bytecode.rkt" "../get-module-bytecode.rkt"
"language-namespace.rkt" "../language-namespace.rkt")
syntax/modcode)
(provide parse parse-module run-compiler) (provide parse parse-module run-compiler)
(define-runtime-path kernel-language-path (define-runtime-path kernel-language-path
"lang/kernel.rkt") "../lang/kernel.rkt")
;; Use Racket's compiler, and then parse the resulting bytecode ;; Use Racket's compiler, and then parse the resulting bytecode

View File

@ -1,6 +1,6 @@
#lang racket/base #lang racket/base
(require "package.rkt") (require "../package.rkt")
(define (test s-exp) (define (test s-exp)
(package s-exp (open-output-string) #;(current-output-port))) (package s-exp (open-output-string) #;(current-output-port)))

View File

@ -3,11 +3,11 @@
(require compiler/zo-parse (require compiler/zo-parse
rackunit rackunit
racket/match racket/match
(for-syntax racket/base) "../parameters.rkt"
"parameters.rkt" "../parse-bytecode.rkt"
"parse-bytecode.rkt" "../lexical-structs.rkt"
"lexical-structs.rkt" "../expression-structs.rkt"
"expression-structs.rkt") (for-syntax racket/base))
(define (run-zo-parse stx) (define (run-zo-parse stx)

View File

@ -1,9 +1,9 @@
#lang racket/base #lang racket/base
(require "parse.rkt" (require "../parse.rkt"
"lexical-structs.rkt" "../lexical-structs.rkt"
"expression-structs.rkt" "../expression-structs.rkt"
"lam-entry-gensym.rkt" "../lam-entry-gensym.rkt"
(for-syntax racket/base)) (for-syntax racket/base))
; Test out the compiler, using the simulator. ; Test out the compiler, using the simulator.

View File

@ -1,10 +1,10 @@
#lang racket #lang racket
(require "il-structs.rkt" (require "../il-structs.rkt"
"lexical-structs.rkt" "../lexical-structs.rkt"
"simulator/simulator-structs.rkt" "../simulator/simulator-structs.rkt"
"simulator/simulator-primitives.rkt" "../simulator/simulator-primitives.rkt"
"simulator/simulator.rkt") "../simulator/simulator.rkt")
(define-syntax (test stx) (define-syntax (test stx)