2 exec guile -q -s "$0" "$@"
5 (load-extension (string-append (getenv "builddir") "/libtest-asmobs")
10 (if (not (equal? (eval x (current-module)) v))
11 (error "Wrong return value" x))
14 (begin (eval x (current-module))
15 (throw 'should-be-error)))
17 (if (eq? key 'should-be-error)
18 (error "Should be error" x))))))
20 (define asmob000 (make-asmob000))
21 (test '(asmob000) '())
22 (test '(asmob000 1) #f)
23 (test '(asmob000 1 2) #f)
24 (test '(asmob000 1 2 3) #f)
26 (define asmob100 (make-asmob100))
28 (test '(asmob100 1) '(1))
29 (test '(asmob100 1 2) #f)
30 (test '(asmob100 1 2 3) #f)
32 (define asmob010 (make-asmob010))
33 (test '(asmob010) '(#f))
34 (test '(asmob010 1) '(1))
35 (test '(asmob010 1 2) #f)
36 (test '(asmob010 1 2 3) #f)
38 (define asmob001 (make-asmob001))
39 (test '(asmob001) '(()))
40 (test '(asmob001 1) '((1)))
41 (test '(asmob001 1 2) '((1 2)))
42 (test '(asmob001 1 2 3) '((1 2 3)))
44 (define asmob200 (make-asmob200))
46 (test '(asmob200 1) #f)
47 (test '(asmob200 1 2) '(1 2))
48 (test '(asmob200 1 2 3) #f)
50 (define asmob110 (make-asmob110))
52 (test '(asmob110 1) '(1 #f))
53 (test '(asmob110 1 2) '(1 2))
54 (test '(asmob110 1 2 3) #f)
56 (define asmob020 (make-asmob020))
57 (test '(asmob020) '(#f #f))
58 (test '(asmob020 1) '(1 #f))
59 (test '(asmob020 1 2) '(1 2))
60 (test '(asmob020 1 2 3) #f)
62 (define asmob101 (make-asmob101))
64 (test '(asmob101 1) '(1 ()))
65 (test '(asmob101 1 2) '(1 (2)))
66 (test '(asmob101 1 2 3) '(1 (2 3)))
68 (define asmob011 (make-asmob011))
69 (test '(asmob011) '(#f ()))
70 (test '(asmob011 1) '(1 ()))
71 (test '(asmob011 1 2) '(1 (2)))
72 (test '(asmob011 1 2 3) '(1 (2 3)))
74 (define asmob300 (make-asmob300))
76 (test '(asmob300 1) #f)
77 (test '(asmob300 1 2) #f)
78 (test '(asmob300 1 2 3) '(1 2 3))
80 (define asmob210 (make-asmob210))
82 (test '(asmob210 1) #f)
83 (test '(asmob210 1 2) '(1 2 #f))
84 (test '(asmob210 1 2 3) '(1 2 3))
86 (define asmob120 (make-asmob120))
88 (test '(asmob120 1) '(1 #f #f))
89 (test '(asmob120 1 2) '(1 2 #f))
90 (test '(asmob120 1 2 3) '(1 2 3))
92 (define asmob030 (make-asmob030))
93 (test '(asmob030) '(#f #f #f))
94 (test '(asmob030 1) '(1 #f #f))
95 (test '(asmob030 1 2) '(1 2 #f))
96 (test '(asmob030 1 2 3) '(1 2 3))
98 (define asmob201 (make-asmob201))
100 (test '(asmob201 1) #f)
101 (test '(asmob201 1 2) '(1 2 ()))
102 (test '(asmob201 1 2 3) '(1 2 (3)))
104 (define asmob021 (make-asmob021))
105 (test '(asmob021) '(#f #f ()))
106 (test '(asmob021 1) '(1 #f ()))
107 (test '(asmob021 1 2) '(1 2 ()))
108 (test '(asmob021 1 2 3) '(1 2 (3)))
110 (define asmob111 (make-asmob111))
111 (test '(asmob111) #f)
112 (test '(asmob111 1) '(1 #f ()))
113 (test '(asmob111 1 2) '(1 2 ()))
114 (test '(asmob111 1 2 3) '(1 2 (3)))