Coverage report: /home/runner/work/geb/geb/test/lambda.lisp
Kind | Covered | All | % |
expression | 247 | 345 | 71.6 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
3
(define-test geb.lambda
4
:parent geb-test-suite)
9
(def pair-of-units-term
10
(lambda:pair unit-term unit-term))
12
(def fst-pair-of-units-term
13
(lambda:fst pair-of-units-term))
15
(def snd-pair-of-units-term
16
(lambda:snd pair-of-units-term))
19
(lambda:right so0 unit-term))
22
(lambda:left so0 unit-term))
25
(lambda:pair right-inj
29
(lambda:case-on left-inj right-inj right-inj))
41
(lambda:lamb (list so1-prod) unit-term))
44
(lambda:lamb (list so1 so0) (lambda:index 0)))
46
(def multi-lambterm-type
47
(lambda:type-of-term-w-fun nil multi-lamb-term))
50
(lambda:app lamb-term (list pair-of-units-term)))
53
(lambda:app multi-lamb-term (list (lambda:index 0) (lambda:index 1))))
56
(list so1 so0 so01-coprod (geb.lambda.main:fun-type so0 so1)))
58
(define-test type-of-unit-term-test
62
(lambda:type-of-term nil unit-term)
63
"type of unit is so1"))
65
(define-test type-of-pair-terms-test
69
(lambda:type-of-term nil pair-of-units-term)
70
"type of product of units is product of so1's")
75
(lambda:ltm (lambda:annotated-term nil pair-of-units-term)))
76
"type of the left unit term is so1")
81
(lambda:rtm (lambda:annotated-term nil pair-of-units-term)))))
83
(define-test fst-unit-term-test
87
(lambda:type-of-term nil fst-pair-of-units-term)
88
"type of the projection from (prod so1 so1) is so1")
93
(lambda:term (lambda:annotated-term nil fst-pair-of-units-term)))
94
"type of the term being projected is (prod so1 so1)"))
96
(define-test snd-unit-term-test
100
(lambda:type-of-term nil snd-pair-of-units-term)
101
"type of the projection from (prod so1 so1) is so1")
106
(lambda:term (lambda:annotated-term nil snd-pair-of-units-term)))
107
"type of the term being projected is (prod so1 so1)"))
109
(define-test proj-term-test
112
(prod so01-coprod so10-coprod)
113
(lambda:type-of-term nil pair-of-injs)
114
"type of a pair of injection is a product of coproducts")
117
(lambda:type-of-term nil
119
(lambda:annotated-term nil pair-of-injs)))
120
"test type annotation for the left term")
123
(lambda:type-of-term nil
125
(lambda:annotated-term nil pair-of-injs)))
126
"test type annotation for the right term"))
129
(define-test casing-test
133
(lambda:type-of-term nil on-l-r-term)
134
"type of term gotten from the casing")
137
(lambda:type-of-term nil
139
(lambda:annotated-term nil on-l-r-term)))
140
"test type annotation for left term")
143
(lambda:type-of-term nil
145
(lambda:annotated-term nil on-l-r-term)))
146
"test type annotation for right term")
149
(lambda:type-of-term nil
151
(lambda:annotated-term nil on-l-r-term)))
152
"type of annotated term supplied for the start of casing is that
153
of the supplied coproduct"))
155
(define-test inl-test
159
(lambda:type-of-term nil right-inj)
160
"type of injection is a coproduct")
163
(lambda:type-of-term nil
165
(lambda:annotated-term nil right-inj)))
166
"test of the type of the annotated right term"))
168
(define-test inr-test
172
(lambda:type-of-term nil left-inj)
173
"type of injection is a coproduct")
176
(lambda:type-of-term nil
178
(lambda:annotated-term nil left-inj)))
179
"test of the type of the annotated left term"))
181
(define-test lamb-test
184
(so-hom-obj so1-prod so1)
185
(lambda:type-of-term nil
187
"test type of lambda term")
190
(lambda:type-of-term nil
192
(lambda:annotated-term nil
194
"test type of annotated term for the lambda term"))
196
(define-test app-test
200
(lambda:type-of-term nil (lambda:app lamb-term (list pair-of-units-term)))
201
"type of function application term")
203
(so-hom-obj so1-prod so1)
204
(lambda:type-of-term nil
206
(lambda:annotated-term nil
208
"test annotated fun term")
211
(lambda:type-of-term nil
213
(lambda:annotated-term nil
216
(define-test index-tests
220
(lambda:type-of-term context-list (lambda:index 0)))
223
(lambda:type-of-term context-list (lambda:index 1)))
226
(lambda:type-of-term context-list (lambda:index 2)))
229
(lambda:type-of-term context-list (lambda:index 3))))
232
(define-test absurd-index-test
238
(lambda:term (lambda:annotated-term context-list
239
(lambda:absurd so1 (lambda:index 1)))))))
241
(define-test exp-hom-test
244
(so-hom-obj (coprod so0 (so-hom-obj so1 so1))
245
(prod so1 (so-hom-obj so0 so1)))
249
(lambda:app (lambda:lamb
250
(list (coprod so0 (geb.lambda.main:fun-type so0 so1)))
253
(lambda:lamb (list so1)
254
(lambda:lamb (list so0)
256
(list (lambda:right so0
257
(lambda:lamb (list so1) unit-term))))))))
259
(define-test multi-lambda-test
263
(mcadr multi-lambterm-type))
266
(mcar multi-lambterm-type)))
268
(define-test multi-app-term
271
(lambda:type-of-term (list so1 so0) multi-app-term))
274
(mcar (lambda:fun (lambda:ann-term1 (list so1 so0) multi-app-term)))))