
1. Lots of #lang-ization, other racketizations, code improvements, etc. 2. Some files that were not working now do. 3. "collects/tests/aligned-pasteboard" had some files that were near duplicates of "collects/mrlib/private/aligned-pasteboard/tests". I've removed the former since in a few places it looked like an older version (eg, there were bogus references to a non-existent "utils.rkt"). The former has more files that are in runnable condition now. 4. There are plenty of tests that look like they're failing, but it wasn't shown since they just return #f, and when they were running with a "-f" these results weren't displayed. 5. I have no idea about the code, this is all just reshuffling and minor editing.
13 lines
443 B
Racket
13 lines
443 B
Racket
#lang racket/base
|
|
|
|
(provide test)
|
|
|
|
;; test: (lambda (a?) ((a? a? . -> . boolean?) a? a? . -> . (void))
|
|
;; tests to see if the expression is true and prints and error if it's not
|
|
(define-syntax test
|
|
(syntax-rules (identity)
|
|
[(_ = actual expected)
|
|
(let ([result (with-handlers ([exn? (λ (x) x)]) actual)])
|
|
(unless (and (not (exn? result)) (= result expected))
|
|
(eprintf "test failed: ~s != ~s\n" result expected)))]))
|