R6RS tests: sps files for more convenient testing, README on how to run
svn: r10854
This commit is contained in:
parent
ec75a07fc6
commit
9af18d6971
94
collects/tests/r6rs/README.txt
Normal file
94
collects/tests/r6rs/README.txt
Normal file
|
@ -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 <id> ... <id>)' in the standard:
|
||||
|
||||
* There's a library of tests "<id>/.../<id>.sls". It defines and
|
||||
exports a function `run-<id>-...<id>-tests'.
|
||||
|
||||
* There's a program "run/<id>/.../<id>.sps" that runs just the
|
||||
library's tests and reports the results.
|
||||
|
||||
======================================================================
|
||||
Hints on running the tests
|
||||
======================================================================
|
||||
|
||||
Ikarus
|
||||
------
|
||||
|
||||
Put this directory at "<somewhere>/tests/r6rs" and run with "run.sps"
|
||||
|
||||
cd <somewhere>
|
||||
ikarus --r6rs-script tests/r6rs/run.sps
|
||||
|
||||
or run an individual library's test, such as "run/program.sps" as
|
||||
|
||||
cd <somewhere>
|
||||
ikarus --r6rs-script tests/r6rs/run/program.sps
|
||||
|
||||
Larceny
|
||||
-------
|
||||
|
||||
Put this directory at "<somewhere>/tests/r6rs" and run with "run.sps"
|
||||
|
||||
larceny -path <somewhere> -r6rs -program run.sps
|
||||
|
||||
or run an individual library's test, such as "run/program.sps" as
|
||||
|
||||
larceny -path <somewhere> -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
|
||||
<id> ... <id>)':
|
||||
|
||||
* Load "test.sls"
|
||||
* Load "<id>/...<id>.sls"
|
||||
* Eval `(import tests r6rs <id> ... <id>)'
|
||||
* Eval `(run-<id>-...<id>-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
|
7
collects/tests/r6rs/run/arithmetic/bitwise.sps
Normal file
7
collects/tests/r6rs/run/arithmetic/bitwise.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/arithmetic/fixnums.sps
Normal file
7
collects/tests/r6rs/run/arithmetic/fixnums.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/arithmetic/flonums.sps
Normal file
7
collects/tests/r6rs/run/arithmetic/flonums.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/base.sps
Normal file
7
collects/tests/r6rs/run/base.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/bytevectors.sps
Normal file
7
collects/tests/r6rs/run/bytevectors.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/conditions.sps
Normal file
7
collects/tests/r6rs/run/conditions.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/control.sps
Normal file
7
collects/tests/r6rs/run/control.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/enums.sps
Normal file
7
collects/tests/r6rs/run/enums.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/eval.sps
Normal file
7
collects/tests/r6rs/run/eval.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/exceptions.sps
Normal file
7
collects/tests/r6rs/run/exceptions.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/hashtables.sps
Normal file
7
collects/tests/r6rs/run/hashtables.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/io/ports.sps
Normal file
7
collects/tests/r6rs/run/io/ports.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/io/simple.sps
Normal file
7
collects/tests/r6rs/run/io/simple.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/lists.sps
Normal file
7
collects/tests/r6rs/run/lists.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/mutable-pairs.sps
Normal file
7
collects/tests/r6rs/run/mutable-pairs.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/mutable-strings.sps
Normal file
7
collects/tests/r6rs/run/mutable-strings.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/programs.sps
Normal file
7
collects/tests/r6rs/run/programs.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/r5rs.sps
Normal file
7
collects/tests/r6rs/run/r5rs.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/reader.sps
Normal file
7
collects/tests/r6rs/run/reader.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/records/procedural.sps
Normal file
7
collects/tests/r6rs/run/records/procedural.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/records/syntactic.sps
Normal file
7
collects/tests/r6rs/run/records/syntactic.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/run.sps
Normal file
7
collects/tests/r6rs/run/run.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/sorting.sps
Normal file
7
collects/tests/r6rs/run/sorting.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/syntax-case.sps
Normal file
7
collects/tests/r6rs/run/syntax-case.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/test.sps
Normal file
7
collects/tests/r6rs/run/test.sps
Normal file
|
@ -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)
|
7
collects/tests/r6rs/run/unicode.sps
Normal file
7
collects/tests/r6rs/run/unicode.sps
Normal file
|
@ -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)
|
|
@ -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")))))
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user