Coverage report: /home/runner/work/geb/geb/test/list.lisp

KindCoveredAll%
expression3951 76.5
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-list :parent geb-test-suite)
4
 
5
 (define-test cons-car-work
6
   :parent geb-list
7
   (is obj-equalp
8
       (gapply (comp list:*car* list:*cons*)
9
               (list (right bool:true-obj)
10
                     (left list:*nil*)))
11
       (right bool:true-obj)))
12
 
13
 
14
 (def list-empty-check
15
   (comp
16
    (mcase bool:true
17
           (comp bool:false (terminal list:*cons-type*)))
18
    list:*cdr*
19
    list:*cons*))
20
 
21
 (define-test cons-cdr-with-nil-gives-nil
22
   :parent geb-list
23
   (is obj-equalp
24
       (gapply list-empty-check
25
               (list (right bool:true-obj)
26
                     (left list:*nil*)))
27
       ;; we check for true!
28
       (right bool:true-obj)))
29
 
30
 (define-test cons-cdr-with-cons-gives-non-empty
31
   :parent geb-list
32
   (is obj-equalp
33
       (gapply list-empty-check
34
               (list (right bool:true-obj)
35
                     (right (list (right bool:true-obj)
36
                                  (left list:*nil*)))))
37
       ;; we check for false
38
       (left bool:false-obj)))