diff --git a/collects/tests/r6rs/README.txt b/collects/tests/r6rs/README.txt new file mode 100644 index 0000000000..8e8add2c78 --- /dev/null +++ b/collects/tests/r6rs/README.txt @@ -0,0 +1,94 @@ + +R6RS Test Suite + +====================================================================== +Files +====================================================================== + +Files that end ".sps" are R6RS programs. The main one is "main.sps", +which runs all the tests. + +Files that end ".sls" are R6RS libraries. For example, "base.sls" is a +library that implements tests for `(r6rs base)'. Many R6RS +implementations will auto-load ".sls" files if you set up your +directoties right. + +In general, for each `(r6rs ... )' in the standard: + + * There's a library of tests "/.../.sls". It defines and + exports a function `run--...-tests'. + + * There's a program "run//.../.sps" that runs just the + library's tests and reports the results. + +====================================================================== +Hints on running the tests +====================================================================== + +Ikarus +------ + +Put this directory at "/tests/r6rs" and run with "run.sps" + + cd + ikarus --r6rs-script tests/r6rs/run.sps + +or run an individual library's test, such as "run/program.sps" as + + cd + ikarus --r6rs-script tests/r6rs/run/program.sps + +Larceny +------- + +Put this directory at "/tests/r6rs" and run with "run.sps" + + larceny -path -r6rs -program run.sps + +or run an individual library's test, such as "run/program.sps" as + + larceny -path -r6rs -program run/program.sps + +PLT Scheme +---------- + +If you get an SVN-based or the "Full" nightly build, then these tests are +in a `tests/r6rs' collection already. You can run all of the tests using + + mzscheme -l tests/r6rs/run.sps + +and so on. + +Otherwise, install this directory as a `tests/r6rs' collection, +perhaps in the location reported by + + (build-path (find-system-path 'addon-dir) + (version) "collects" + "tests" "r6rs") + +You could also play with the PLTCOLLECTS environment variable. + +Ypsilon +------- + +[If there's a library-autoload mechanism, we didn't figure it + out. Better ideas are welcome...] + +Load the library declarations that you're interested in. For `(rnrs + ... )': + + * Load "test.sls" + * Load "/....sls" + * Eval `(import tests r6rs ... )' + * Eval `(run--...-tests)' + * Eval `(import tests r6rs test)' + * Eval `(show-test-results)' + +====================================================================== +Feedback +====================================================================== + +Reports of bugs (in the tests) and new tests would be very much +appreciated. File either as a PLT Scheme bug report at + + http://bugs.plt-scheme.org diff --git a/collects/tests/r6rs/run.sls b/collects/tests/r6rs/run.sps similarity index 100% rename from collects/tests/r6rs/run.sls rename to collects/tests/r6rs/run.sps diff --git a/collects/tests/r6rs/run/arithmetic/bitwise.sps b/collects/tests/r6rs/run/arithmetic/bitwise.sps new file mode 100644 index 0000000000..e3cdc63f1e --- /dev/null +++ b/collects/tests/r6rs/run/arithmetic/bitwise.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs arithmetic bitwise) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs arithmetic bitwise)\n") +(run-arithmetic-bitwise-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/arithmetic/fixnums.sps b/collects/tests/r6rs/run/arithmetic/fixnums.sps new file mode 100644 index 0000000000..45d9a032f2 --- /dev/null +++ b/collects/tests/r6rs/run/arithmetic/fixnums.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs arithmetic fixnums) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs arithmetic fixnums)\n") +(run-arithmetic-fixnums-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/arithmetic/flonums.sps b/collects/tests/r6rs/run/arithmetic/flonums.sps new file mode 100644 index 0000000000..8e0fe068b4 --- /dev/null +++ b/collects/tests/r6rs/run/arithmetic/flonums.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs arithmetic flonums) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs arithmetic flonums)\n") +(run-arithmetic-flonums-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/base.sps b/collects/tests/r6rs/run/base.sps new file mode 100644 index 0000000000..a3b6ac387f --- /dev/null +++ b/collects/tests/r6rs/run/base.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs base) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs base)\n") +(run-base-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/bytevectors.sps b/collects/tests/r6rs/run/bytevectors.sps new file mode 100644 index 0000000000..a471fd425a --- /dev/null +++ b/collects/tests/r6rs/run/bytevectors.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs bytevectors) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs bytevectors)\n") +(run-bytevectors-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/conditions.sps b/collects/tests/r6rs/run/conditions.sps new file mode 100644 index 0000000000..2cdbae6752 --- /dev/null +++ b/collects/tests/r6rs/run/conditions.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs conditions) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs conditions)\n") +(run-conditions-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/control.sps b/collects/tests/r6rs/run/control.sps new file mode 100644 index 0000000000..f4f6c1ff8d --- /dev/null +++ b/collects/tests/r6rs/run/control.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs control) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs control)\n") +(run-control-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/enums.sps b/collects/tests/r6rs/run/enums.sps new file mode 100644 index 0000000000..652d36eb67 --- /dev/null +++ b/collects/tests/r6rs/run/enums.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs enums) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs enums)\n") +(run-enums-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/eval.sps b/collects/tests/r6rs/run/eval.sps new file mode 100644 index 0000000000..95cd380d3d --- /dev/null +++ b/collects/tests/r6rs/run/eval.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs eval) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs eval)\n") +(run-eval-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/exceptions.sps b/collects/tests/r6rs/run/exceptions.sps new file mode 100644 index 0000000000..a5216ca3d5 --- /dev/null +++ b/collects/tests/r6rs/run/exceptions.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs exceptions) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs exceptions)\n") +(run-exceptions-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/hashtables.sps b/collects/tests/r6rs/run/hashtables.sps new file mode 100644 index 0000000000..d80a005784 --- /dev/null +++ b/collects/tests/r6rs/run/hashtables.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs hashtables) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs hashtables)\n") +(run-hashtables-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/io/ports.sps b/collects/tests/r6rs/run/io/ports.sps new file mode 100644 index 0000000000..de87c4c012 --- /dev/null +++ b/collects/tests/r6rs/run/io/ports.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs io ports) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs io ports)\n") +(run-io-ports-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/io/simple.sps b/collects/tests/r6rs/run/io/simple.sps new file mode 100644 index 0000000000..e479e80db2 --- /dev/null +++ b/collects/tests/r6rs/run/io/simple.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs io simple) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs io simple)\n") +(run-io-simple-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/lists.sps b/collects/tests/r6rs/run/lists.sps new file mode 100644 index 0000000000..a82cf8c737 --- /dev/null +++ b/collects/tests/r6rs/run/lists.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs lists) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs lists)\n") +(run-lists-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/mutable-pairs.sps b/collects/tests/r6rs/run/mutable-pairs.sps new file mode 100644 index 0000000000..7f0c4dd7b7 --- /dev/null +++ b/collects/tests/r6rs/run/mutable-pairs.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs mutable-pairs) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs mutable-pairs)\n") +(run-mutable-pairs-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/mutable-strings.sps b/collects/tests/r6rs/run/mutable-strings.sps new file mode 100644 index 0000000000..fa781d8cfe --- /dev/null +++ b/collects/tests/r6rs/run/mutable-strings.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs mutable-strings) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs mutable-strings)\n") +(run-mutable-strings-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/programs.sps b/collects/tests/r6rs/run/programs.sps new file mode 100644 index 0000000000..1caf219ced --- /dev/null +++ b/collects/tests/r6rs/run/programs.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs programs) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs programs)\n") +(run-programs-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/r5rs.sps b/collects/tests/r6rs/run/r5rs.sps new file mode 100644 index 0000000000..d63a4f18c0 --- /dev/null +++ b/collects/tests/r6rs/run/r5rs.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs r5rs) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs r5rs)\n") +(run-r5rs-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/reader.sps b/collects/tests/r6rs/run/reader.sps new file mode 100644 index 0000000000..812fae6ef5 --- /dev/null +++ b/collects/tests/r6rs/run/reader.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs reader) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs reader)\n") +(run-reader-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/records/procedural.sps b/collects/tests/r6rs/run/records/procedural.sps new file mode 100644 index 0000000000..8f50172fdc --- /dev/null +++ b/collects/tests/r6rs/run/records/procedural.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs records procedural) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs records procedural)\n") +(run-records-procedural-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/records/syntactic.sps b/collects/tests/r6rs/run/records/syntactic.sps new file mode 100644 index 0000000000..8b3ac2a710 --- /dev/null +++ b/collects/tests/r6rs/run/records/syntactic.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs records syntactic) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs records syntactic)\n") +(run-records-syntactic-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/run.sps b/collects/tests/r6rs/run/run.sps new file mode 100644 index 0000000000..dc393128ba --- /dev/null +++ b/collects/tests/r6rs/run/run.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs run) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs run)\n") +(run-run-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/sorting.sps b/collects/tests/r6rs/run/sorting.sps new file mode 100644 index 0000000000..57dd297752 --- /dev/null +++ b/collects/tests/r6rs/run/sorting.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs sorting) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs sorting)\n") +(run-sorting-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/syntax-case.sps b/collects/tests/r6rs/run/syntax-case.sps new file mode 100644 index 0000000000..687fe86339 --- /dev/null +++ b/collects/tests/r6rs/run/syntax-case.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs syntax-case) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs syntax-case)\n") +(run-syntax-case-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/test.sps b/collects/tests/r6rs/run/test.sps new file mode 100644 index 0000000000..c54e040f3d --- /dev/null +++ b/collects/tests/r6rs/run/test.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs test) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs test)\n") +(run-test-tests) +(report-test-results) diff --git a/collects/tests/r6rs/run/unicode.sps b/collects/tests/r6rs/run/unicode.sps new file mode 100644 index 0000000000..53c4296e6b --- /dev/null +++ b/collects/tests/r6rs/run/unicode.sps @@ -0,0 +1,7 @@ +#!r6rs +(import (tests r6rs unicode) + (tests r6rs test) + (rnrs io simple)) +(display "Running tests for (rnrs unicode)\n") +(run-unicode-tests) +(report-test-results) diff --git a/collects/tests/r6rs/test.sls b/collects/tests/r6rs/test.sls index 9a89c9f8ce..9f591dd7e7 100644 --- a/collects/tests/r6rs/test.sls +++ b/collects/tests/r6rs/test.sls @@ -36,7 +36,7 @@ (define (approx v) (let ([n (* (inexact v) 1000.0)]) (+ (round (real-part n)) - (* (round (imag-part n)) +1i)))) + (* (round (imag-part n)) (sqrt -1))))) (define-syntax test/exn (syntax-rules () @@ -133,6 +133,3 @@ (display " of ") (display checked) (display " tests failed.\n"))))) - - -