-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathabsento-closure-tests.scm
61 lines (47 loc) · 1.7 KB
/
absento-closure-tests.scm
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
51
52
53
54
55
56
57
58
59
60
61
(test "absento 'closure-1a"
(run* (q) (absento 'closure q) (== q 'closure))
'())
(test "absento 'closure-1b"
(run* (q) (== q 'closure) (absento 'closure q))
'())
(test "absento 'closure-2a"
(run* (q) (fresh (a d) (== q 'closure) (absento 'closure q)))
'())
(test "absento 'closure-2b"
(run* (q) (fresh (a d) (absento 'closure q) (== q 'closure)))
'())
(test "absento 'closure-3a"
(run* (q) (fresh (a d) (absento 'closure q) (== `(,a . ,d) q)))
'(((_.0 . _.1) (absento (closure _.0) (closure _.1)))))
(test "absento 'closure-3b"
(run* (q) (fresh (a d) (== `(,a . ,d) q) (absento 'closure q)))
'(((_.0 . _.1) (absento (closure _.0) (closure _.1)))))
(test "absento 'closure-4a"
(run* (q) (fresh (a d) (absento 'closure q) (== `(,a . ,d) q) (== 'closure a)))
'())
(test "absento 'closure-4b"
(run* (q) (fresh (a d) (absento 'closure q) (== 'closure a) (== `(,a . ,d) q)))
'())
(test "absento 'closure-4c"
(run* (q) (fresh (a d) (== 'closure a) (absento 'closure q) (== `(,a . ,d) q)))
'())
(test "absento 'closure-4d"
(run* (q) (fresh (a d) (== 'closure a) (== `(,a . ,d) q) (absento 'closure q)))
'())
(test "absento 'closure-5a"
(run* (q) (fresh (a d) (absento 'closure q) (== `(,a . ,d) q) (== 'closure d)))
'())
(test "absento 'closure-5b"
(run* (q) (fresh (a d) (absento 'closure q) (== 'closure d) (== `(,a . ,d) q)))
'())
(test "absento 'closure-5c"
(run* (q) (fresh (a d) (== 'closure d) (absento 'closure q) (== `(,a . ,d) q)))
'())
(test "absento 'closure-5d"
(run* (q) (fresh (a d) (== 'closure d) (== `(,a . ,d) q) (absento 'closure q)))
'())
(test "absento 'closure-6"
(run* (q)
(== `(3 (closure x (x x) ((y . 7))) #t) q)
(absento 'closure q))
'())