Coverage report: /development/source/library/com/dydra/gitlab/dydra-cgi/ffi/lisp/rdfcache/quad.lisp

KindCoveredAll%
expression033 0.0
branch02 0.0
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 (in-package :rdfcache)
2
 
3
 ;;; Quad API: Accessors
4
 
5
 (defmacro quad-slot-value (quad-var slot-name)
6
   `(foreign-slot-value ,quad-var 'quad ,slot-name))
7
 
8
 ;; Quad API
9
 
10
 (defun make-quad (&optional context subject predicate object)
11
   "Returns a foreign pointer to a newly-allocated quad."
12
   (let ((quad (%make-quad (or subject (null-pointer))
13
                           (or predicate (null-pointer))
14
                           (or object (null-pointer))
15
                           (or context (null-pointer)))))
16
     quad))
17
 
18
 ;;; Quad API: Term accessors
19
 
20
 (defun quad-term-p (quad term-name)
21
   "Returns `T` if the given `quad` has the term value designated by
22
    `term-name`, `NIL` otherwise."
23
   (not (null-pointer-p (quad-term-pointer quad term-name))))
24
 
25
 (defun quad-term-pointer (quad term-name)
26
   (with-checked-pointer (quad)
27
     (quad-slot-value quad term-name)))
28
 
29
 (defun quad-term-type (quad term-name)
30
   (term-type (quad-term-pointer quad term-name)))
31
 
32
 (defun quad-term-value (quad term-name)
33
   (term-value (quad-term-pointer quad term-name)))