diff --git a/tests/flonum-tests.scm b/tests/flonum-tests.scm index 5abe4772..978099c0 100644 --- a/tests/flonum-tests.scm +++ b/tests/flonum-tests.scm @@ -1,6 +1,6 @@ ;;;; these will fail when compiled either without flonums or trig funcs -(import (chibi test)) +(import (only (chibi test) test-begin test-assert test test-end)) (test-begin "floating point") diff --git a/tests/hash-tests.scm b/tests/hash-tests.scm index 09792c5e..bbfd44eb 100644 --- a/tests/hash-tests.scm +++ b/tests/hash-tests.scm @@ -1,5 +1,5 @@ -(import (srfi 69) (chibi test)) +(import (srfi 69) (only (chibi test) test-begin test test-end)) (test-begin "hash") diff --git a/tests/loop-tests.scm b/tests/loop-tests.scm index d1ff3143..a26205d4 100644 --- a/tests/loop-tests.scm +++ b/tests/loop-tests.scm @@ -1,5 +1,5 @@ -(import (chibi loop) (chibi test)) +(import (chibi loop) (only (chibi test) test-begin test test-end)) (test-begin "loops") diff --git a/tests/match-tests.scm b/tests/match-tests.scm index 97eb4e47..a2c054c2 100644 --- a/tests/match-tests.scm +++ b/tests/match-tests.scm @@ -1,5 +1,5 @@ -(import (chibi match) (chibi test)) +(import (chibi match) (only (chibi test) test-begin test test-end)) (test-begin "match") diff --git a/tests/numeric-tests.scm b/tests/numeric-tests.scm index 43b16cb4..22478044 100644 --- a/tests/numeric-tests.scm +++ b/tests/numeric-tests.scm @@ -2,7 +2,7 @@ ;; these tests are only valid if chibi-scheme is compiled with full ;; numeric support (USE_BIGNUMS, USE_FLONUMS and USE_MATH) -(import (chibi test)) +(import (only (chibi test) test-begin test test-end)) (test-begin "numbers") diff --git a/tests/record-tests.scm b/tests/record-tests.scm index 32237fb9..51f47889 100644 --- a/tests/record-tests.scm +++ b/tests/record-tests.scm @@ -1,5 +1,6 @@ -(import (srfi 99 records syntactic) (chibi test)) +(import (srfi 99 records syntactic) + (only (chibi test) test-begin test-assert test test-end)) (test-begin "records") diff --git a/tests/scribble-test.scm b/tests/scribble-test.scm index d8eee369..9869130c 100644 --- a/tests/scribble-test.scm +++ b/tests/scribble-test.scm @@ -1,39 +1,10 @@ -(import (chibi scribble)) - -(define *tests-run* 0) -(define *tests-passed* 0) - -(define-syntax test - (syntax-rules () - ((test str expect expr) - (begin - (set! *tests-run* (+ *tests-run* 1)) - (let ((res expr)) - (display str) - (write-char #\space) - (display (make-string (max 0 (- 72 (string-length str))) #\.)) - (flush-output) - (cond - ((equal? res expect) - (set! *tests-passed* (+ *tests-passed* 1)) - (display " [PASS]\n")) - (else - (display " [FAIL]\n") - (display " expected ") (write expect) - (display " but got ") (write res) (newline)))))))) - -(define (test-report) - (write *tests-passed*) - (display " out of ") - (write *tests-run*) - (display " passed (") - (write (* (/ *tests-passed* *tests-run*) 100)) - (display "%)") - (newline)) +(import (chibi scribble) (only (chibi test) test-begin test test-end)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(test-begin "scribble") + (define (test-scribble expect str) (test (call-with-output-string (lambda (out) (write str out))) expect @@ -234,4 +205,4 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(test-report) +(test-end) diff --git a/tests/sort-tests.scm b/tests/sort-tests.scm index f506baca..6272f79c 100644 --- a/tests/sort-tests.scm +++ b/tests/sort-tests.scm @@ -1,5 +1,5 @@ -(import (srfi 95) (chibi test)) +(import (srfi 95) (only (chibi test) test-begin test test-end)) (test-begin "sorting") diff --git a/tests/thread-tests.scm b/tests/thread-tests.scm index 32ef8a74..74cc5cd7 100644 --- a/tests/thread-tests.scm +++ b/tests/thread-tests.scm @@ -1,5 +1,5 @@ -(import (srfi 18) (chibi test)) +(import (srfi 18) (only (chibi test) test-begin test test-end)) (test-begin) diff --git a/tests/unicode-tests.scm b/tests/unicode-tests.scm index f3705094..a7c08d41 100644 --- a/tests/unicode-tests.scm +++ b/tests/unicode-tests.scm @@ -1,7 +1,7 @@ ;; These tests are only valid if chibi-scheme is compiled with Unicode ;; support (SEXP_USE_UTF8_STRINGS). -(import (chibi test)) +(import (only (chibi test) test-begin test test-end)) (test-begin "unicode")