chibi-scheme/lib/chibi/crypto/md5-test.sld
Alex Shinn 4e5cdedc03 Converting tests to modules instead of separate programs.
By convention, a library meant for testing exports "run-tests".
Also by convention, assume the test for (foo bar) is (foo bar-test),
keeping the test in the same directory and avoiding confusion since
(chibi test) is not a test for (chibi).
- Avoids the hack of "load"ing test, with resulting namespace complications.
- Allows keeping tests together with the libraries.
- Allows setting up test hooks before running.
- Allows implicit inference of test locations when using above conventions.
2015-04-05 23:38:51 +09:00

13 lines
437 B
Scheme

(define-library (chibi crypto md5-test)
(export run-tests)
(import (chibi) (chibi crypto md5) (chibi test))
(begin
(define (run-tests)
(test-begin "md5")
(test "d41d8cd98f00b204e9800998ecf8427e"
(md5 ""))
(test "900150983cd24fb0d6963f7d28e17f72"
(md5 "abc"))
(test "9e107d9d372bb6826bd81d3542a419d6"
(md5 "The quick brown fox jumps over the lazy dog"))
(test-end))))