Coverage report: /home/samppa/personal/opiskelu/ohtuprojekti/pulsu/trunk/testdb.lisp
Kind | Covered | All | % |
expression | 16 | 61 | 26.2 |
branch | 0 | 2 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
(in-package :puls.test)
3
(defvar *mock-events* nil)
4
(defvar *mock-unified* nil)
6
(defun load-mock-events ()
8
(with-open-file (stream (merge-pathnames "mock-events.sexp"
9
cl-user::*project-root*))
12
;; Simulates "select * from plus ... "
13
(defun mock-get-event (docno event-id)
15
(and (equal docno (first x))
16
(equal event-id (nth 27 x))))
19
(defun write-mock-events (&optional (how-many? 20))
20
(let ((file (merge-pathnames "mock-events.sexp"
21
cl-user::*project-root*))
24
(format nil "select * from plus limit ~A" how-many?))))
25
(with-open-file (stream file :direction :output
26
:if-exists :supersede)
27
(print events stream))))
29
(defun load-mock-unified ()
31
(with-open-file (stream (merge-pathnames "mock-unified.sexp"
32
cl-user::*project-root*))
35
(defun write-mock-unified ()
36
(let ((file (merge-pathnames "mock-unified.sexp"
37
cl-user::*project-root*))
39
(puls.ui::get-newest-unified-cases :n 5)))
40
(with-open-file (stream file :direction :output
41
:if-exists :supersede)
42
(print events stream))))