1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
+
-
+
-
+
-
-
+
+
| ;;======================================================================
;; S E R V E R
;;======================================================================
;; Run like this:
;;
;; (cd ..;make && make install) && ./rununittest.sh server 1;(cd simplerun;megatest -stop-server 0)
;; BB: 2016-01-20 suspect this file is dead code
(test #f #t (vector? (make-dbr:dbstruct "/tmp")))
(test #f #t (dbr:dbstruct? (make-dbr:dbstruct-wrapper path: "/tmp")))
(define dbstruct (make-dbr:dbstruct "/tmp"))
(define dbstruct (make-dbr:dbstruct-wrapper path: "/tmp"))
(test #f #t (begin (dbr:dbstruct-set-main! dbstruct "blah") #t))
(test #f "blah" (dbr:dbstruct-get-main dbstruct))
(test #f #t (begin (dbr:dbstruct-main-set! dbstruct "blah") #t))
(test #f "blah" (dbr:dbstruct-main dbstruct))
(for-each
(lambda (run-id)
(test #f #t (vector? (dbr:dbstruct-get-rundb-rec dbstruct run-id))))
(list 1 2 3 4 5 6 7 8 9 #f))
(test #f 0 (dbr:dbstruct-field-name->num 'rundb))
(test #f 1 (dbr:dbstruct-field-name->num 'inmem))
|