diff --git a/test-all.rkt b/tests/test-all.rkt similarity index 100% rename from test-all.rkt rename to tests/test-all.rkt diff --git a/test-assemble.rkt b/tests/test-assemble.rkt similarity index 99% rename from test-assemble.rkt rename to tests/test-assemble.rkt index 0833b97..736659e 100644 --- a/test-assemble.rkt +++ b/tests/test-assemble.rkt @@ -1,10 +1,10 @@ #lang racket -(require "js-assembler/assemble.rkt" - "js-assembler/get-runtime.rkt" - "browser-evaluate.rkt" - "lexical-structs.rkt" - "il-structs.rkt" +(require "../js-assembler/assemble.rkt" + "../js-assembler/get-runtime.rkt" + "../browser-evaluate.rkt" + "../lexical-structs.rkt" + "../il-structs.rkt" racket/port racket/promise racket/runtime-path) diff --git a/test-browser-evaluate.rkt b/tests/test-browser-evaluate.rkt similarity index 98% rename from test-browser-evaluate.rkt rename to tests/test-browser-evaluate.rkt index f086b30..3a8c7cc 100644 --- a/test-browser-evaluate.rkt +++ b/tests/test-browser-evaluate.rkt @@ -1,8 +1,8 @@ #lang racket -(require "js-assembler/get-runtime.rkt" - "browser-evaluate.rkt" - "package.rkt" - racket/runtime-path) +(require "../js-assembler/get-runtime.rkt" + "../browser-evaluate.rkt" + "../package.rkt") + diff --git a/test-compiler-2.rkt b/tests/test-compiler-2.rkt similarity index 97% rename from test-compiler-2.rkt rename to tests/test-compiler-2.rkt index 9f6c80c..9c4bc40 100644 --- a/test-compiler-2.rkt +++ b/tests/test-compiler-2.rkt @@ -1,8 +1,8 @@ #lang racket -(require "simulator/simulator.rkt" - "simulator/simulator-structs.rkt" - "simulator/simulator-helpers.rkt" +(require "../simulator/simulator.rkt" + "../simulator/simulator-structs.rkt" + "../simulator/simulator-helpers.rkt" "test-helpers.rkt") diff --git a/test-compiler.rkt b/tests/test-compiler.rkt similarity index 99% rename from test-compiler.rkt rename to tests/test-compiler.rkt index e2d0c3b..6f9941f 100644 --- a/test-compiler.rkt +++ b/tests/test-compiler.rkt @@ -1,8 +1,8 @@ #lang racket -(require "simulator/simulator.rkt" - "simulator/simulator-structs.rkt" - "simulator/simulator-helpers.rkt" +(require "../simulator/simulator.rkt" + "../simulator/simulator-structs.rkt" + "../simulator/simulator-helpers.rkt" "test-helpers.rkt") diff --git a/test-conform-browser.rkt b/tests/test-conform-browser.rkt similarity index 89% rename from test-conform-browser.rkt rename to tests/test-conform-browser.rkt index 60c81e4..98f99db 100644 --- a/test-conform-browser.rkt +++ b/tests/test-conform-browser.rkt @@ -1,11 +1,11 @@ #lang racket -(require "browser-evaluate.rkt" - "package.rkt" - "js-assembler/get-runtime.rkt" +(require "../browser-evaluate.rkt" + "../package.rkt" + "../js-assembler/get-runtime.rkt" racket/port racket/runtime-path) -(define-runtime-path conform-path (build-path "tests" "conform")) +(define-runtime-path conform-path (build-path "conform")) (define evaluate (make-evaluate diff --git a/test-conform.rkt b/tests/test-conform.rkt similarity index 81% rename from test-conform.rkt rename to tests/test-conform.rkt index 0da541f..6269904 100644 --- a/test-conform.rkt +++ b/tests/test-conform.rkt @@ -1,10 +1,13 @@ #lang racket -(require "simulator/simulator.rkt" - "simulator/simulator-structs.rkt" - "test-helpers.rkt") +(require "../simulator/simulator.rkt" + "../simulator/simulator-structs.rkt" + "test-helpers.rkt" + racket/runtime-path) +(define-runtime-path conform-path "conform") + ;; run: machine -> (machine number) ;; Run the machine to completion. @@ -52,7 +55,7 @@ (printf "ok. ~s steps.\n\n" num-steps)))))])) -(test (read (open-input-file "tests/conform/program0.sch")) - (port->string (open-input-file "tests/conform/expected0.txt")) +(test (read (open-input-file (build-path conform-path "program0.sch"))) + (port->string (open-input-file (build-path conform-path "expected0.txt"))) ;;#:debug? #t ) diff --git a/test-earley-browser.rkt b/tests/test-earley-browser.rkt similarity index 89% rename from test-earley-browser.rkt rename to tests/test-earley-browser.rkt index c178f55..2f7a891 100644 --- a/test-earley-browser.rkt +++ b/tests/test-earley-browser.rkt @@ -1,13 +1,13 @@ #lang racket -(require "browser-evaluate.rkt" - "package.rkt" - "js-assembler/get-runtime.rkt" +(require "../browser-evaluate.rkt" + "../package.rkt" + "../js-assembler/get-runtime.rkt" racket/port racket/runtime-path racket/runtime-path (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 diff --git a/test-earley.rkt b/tests/test-earley.rkt similarity index 80% rename from test-earley.rkt rename to tests/test-earley.rkt index 855ae63..3ea5975 100644 --- a/test-earley.rkt +++ b/tests/test-earley.rkt @@ -1,8 +1,11 @@ #lang racket -(require "simulator/simulator.rkt" - "simulator/simulator-structs.rkt" - "test-helpers.rkt") +(require "../simulator/simulator.rkt" + "../simulator/simulator-structs.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)))))])) -(test (read (open-input-file "tests/earley/earley.sch")) - (port->string (open-input-file "tests/earley/expected.txt")) - ) +(test (read (open-input-file (build-path earley-path "earley.sch"))) + (port->string (open-input-file (build-path earley-path "expected.txt")))) diff --git a/test-get-dependencies.rkt b/tests/test-get-dependencies.rkt similarity index 79% rename from test-get-dependencies.rkt rename to tests/test-get-dependencies.rkt index 1101422..44d58ef 100644 --- a/test-get-dependencies.rkt +++ b/tests/test-get-dependencies.rkt @@ -1,16 +1,16 @@ #lang racket -(require "get-dependencies.rkt" - "get-module-bytecode.rkt" - "parse-bytecode.rkt" - "lexical-structs.rkt" +(require "../get-dependencies.rkt" + "../get-module-bytecode.rkt" + "../parse-bytecode.rkt" + "../lexical-structs.rkt" racket/path racket/runtime-path rackunit) -(define-runtime-path this-path ".") +(define-runtime-path compiler-path "..") (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 @@ -50,7 +50,7 @@ (file "~a/get-module-bytecode.rkt")) (exp 1)) EOF - (path->string (normalize-path this-path))) + (path->string (normalize-path compiler-path))) ))))) module-name<) (sort @@ -59,5 +59,5 @@ EOF (make-ModuleName 'collects/racket/math.rkt (build-path collects-dir "racket" "math.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<)) \ No newline at end of file diff --git a/test-helpers.rkt b/tests/test-helpers.rkt similarity index 79% rename from test-helpers.rkt rename to tests/test-helpers.rkt index 10b7dc8..80240c0 100644 --- a/test-helpers.rkt +++ b/tests/test-helpers.rkt @@ -2,18 +2,18 @@ (require (prefix-in racket: racket/base) racket/runtime-path - "compiler-structs.rkt" - "compiler.rkt" - "parse-bytecode.rkt" - "get-module-bytecode.rkt" - "language-namespace.rkt" - syntax/modcode) + "../compiler-structs.rkt" + "../compiler.rkt" + "../parse-bytecode.rkt" + "../get-module-bytecode.rkt" + "../language-namespace.rkt") + (provide parse parse-module run-compiler) (define-runtime-path kernel-language-path - "lang/kernel.rkt") + "../lang/kernel.rkt") ;; Use Racket's compiler, and then parse the resulting bytecode diff --git a/test-package.rkt b/tests/test-package.rkt similarity index 91% rename from test-package.rkt rename to tests/test-package.rkt index ad9d57f..e58d470 100644 --- a/test-package.rkt +++ b/tests/test-package.rkt @@ -1,6 +1,6 @@ #lang racket/base -(require "package.rkt") +(require "../package.rkt") (define (test s-exp) (package s-exp (open-output-string) #;(current-output-port))) diff --git a/test-parse-bytecode.rkt b/tests/test-parse-bytecode.rkt similarity index 98% rename from test-parse-bytecode.rkt rename to tests/test-parse-bytecode.rkt index 68bbf9c..024a8d0 100644 --- a/test-parse-bytecode.rkt +++ b/tests/test-parse-bytecode.rkt @@ -3,11 +3,11 @@ (require compiler/zo-parse rackunit racket/match - (for-syntax racket/base) - "parameters.rkt" - "parse-bytecode.rkt" - "lexical-structs.rkt" - "expression-structs.rkt") + "../parameters.rkt" + "../parse-bytecode.rkt" + "../lexical-structs.rkt" + "../expression-structs.rkt" + (for-syntax racket/base)) (define (run-zo-parse stx) diff --git a/test-parse.rkt b/tests/test-parse.rkt similarity index 99% rename from test-parse.rkt rename to tests/test-parse.rkt index 91951fa..8bb4e37 100644 --- a/test-parse.rkt +++ b/tests/test-parse.rkt @@ -1,9 +1,9 @@ #lang racket/base -(require "parse.rkt" - "lexical-structs.rkt" - "expression-structs.rkt" - "lam-entry-gensym.rkt" +(require "../parse.rkt" + "../lexical-structs.rkt" + "../expression-structs.rkt" + "../lam-entry-gensym.rkt" (for-syntax racket/base)) ; Test out the compiler, using the simulator. diff --git a/test-simulator.rkt b/tests/test-simulator.rkt similarity index 99% rename from test-simulator.rkt rename to tests/test-simulator.rkt index 25cc996..50e504b 100644 --- a/test-simulator.rkt +++ b/tests/test-simulator.rkt @@ -1,10 +1,10 @@ #lang racket -(require "il-structs.rkt" - "lexical-structs.rkt" - "simulator/simulator-structs.rkt" - "simulator/simulator-primitives.rkt" - "simulator/simulator.rkt") +(require "../il-structs.rkt" + "../lexical-structs.rkt" + "../simulator/simulator-structs.rkt" + "../simulator/simulator-primitives.rkt" + "../simulator/simulator.rkt") (define-syntax (test stx)