2007-05-15 12:29:47 -04:00
|
|
|
|
|
|
|
(library (tests framework)
|
2009-04-06 11:47:40 -04:00
|
|
|
(export define-tests src-file)
|
2007-05-15 12:29:47 -04:00
|
|
|
(import (ikarus))
|
2009-04-06 11:47:40 -04:00
|
|
|
|
|
|
|
(define (src-file x)
|
|
|
|
(string-append (or (getenv "IKARUS_SRC_DIR") ".") "/" x))
|
2007-05-15 12:29:47 -04:00
|
|
|
(define-syntax define-tests
|
|
|
|
(syntax-rules ()
|
|
|
|
[(_ test-all [p0 e0] ...)
|
|
|
|
(define test-all
|
|
|
|
(lambda ()
|
|
|
|
(let ([p p0] [e e0])
|
|
|
|
(unless (p e)
|
2008-07-19 17:41:06 -04:00
|
|
|
(error 'test-all "failed"
|
2007-05-15 12:29:47 -04:00
|
|
|
'(p0 e0) e)))
|
|
|
|
...
|
2007-06-11 04:59:11 -04:00
|
|
|
(printf "[~s: ~s] Happy Happy Joy Joy\n"
|
|
|
|
(length '(p0 ...))'test-all )))])))
|