forked from jasonhemann/miniKanren
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.ss
52 lines (36 loc) · 1.08 KB
/
test.ss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(define-syntax test-check
(syntax-rules ()
((_ title tested-expression expected-result)
(begin
(printf "Testing ~s\n" title)
(let* ((expected expected-result)
(produced tested-expression))
(or (equal? expected produced)
(errorf 'test-check
"Failed: ~a~%Expected: ~a~%Computed: ~a~%"
'tested-expression expected produced)))))))
(load "mk.scm")
(printf "==-tests\n")
(load "==-tests.ss")
(printf "symbolo-tests\n")
(load "symbolo-tests.ss")
(printf "numbero-tests\n")
(load "numbero-tests.ss")
(printf "symbolo-numbero-tests\n")
(load "symbolo-numbero-tests.ss")
(printf "not-pairo-tests\n")
(load "not-pairo-tests.ss")
(printf "disequality-tests\n")
(load "disequality-tests.ss")
(printf "absento-closure-tests\n")
(load "absento-closure-tests.ss")
(printf "absento-tests\n")
(load "absento-tests.ss")
(printf "test-infer\n")
(load "test-infer.ss")
(printf "test-interp\n")
(load "test-interp.ss")
(printf "test-numbers\n")
(load "test-numbers.ss")
(printf "test-quines\n")
(load "test-quines.ss")