Coverage report: /home/runner/work/geb/geb/test/lambda-experimental.lisp

KindCoveredAll%
expression1642 38.1
branch00nil
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 (in-package :geb-test)
2
 
3
 (define-test geb.lambda.experimental :parent geb-test-suite)
4
 
5
 (def test-term '(lambda (x y z) (+ x y (lambda (a b c) (+ a b c z)))))
6
 
7
 (def curried-term
8
   '(lambda x (lambda y (lambda z (+ x y (lambda a (lambda b (lambda c (+ a b c z)))))))))
9
 
10
 (def nameless-term
11
   `(lambda nil
12
      (lambda nil
13
        (lambda nil
14
          (+ ,(geb.lambda.experimental:make-index :depth 2)
15
             ,(geb.lambda.experimental:make-index :depth 1)
16
             (lambda nil
17
               (lambda nil
18
                 (lambda nil
19
                   (+ ,(geb.lambda.experimental:make-index :depth 2)
20
                      ,(geb.lambda.experimental:make-index :depth 1)
21
                      ,(geb.lambda.experimental:make-index :depth 0)
22
                      ,(geb.lambda.experimental:make-index :depth 3))))))))))
23
 
24
 (define-test curry-expands-properly
25
   :parent geb.lambda.experimental
26
   (is equalp (geb.lambda.experimental:curry-lambda test-term)
27
               curried-term))
28
 
29
 (define-test nameless-works-properly
30
   :parent geb.lambda.experimental
31
   (is equalp (geb.lambda.experimental:nameless curried-term) nameless-term))
32
 
33
 (define-test mixin-works-well
34
   :parent geb.lambda.experimental
35
   (is obj-equalp
36
       (geb.lambda.spec:pair (geb.lambda.spec:unit) (geb.lambda.spec:unit))
37
       (geb.lambda.spec:pair (geb.lambda.spec:unit) (geb.lambda.spec:unit))))