8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
(test #f #t (vector? (make-dbr:dbstruct "/tmp")))
(define dbstruct (make-dbr:dbstruct "/tmp"))
(test #f #t (begin (dbr:dbstruct-set-main! dbstruct "blah") #t))
(test #f "blah" (dbr:dbstruct-get-main dbstruct))
(test #f #t (vector? (dbr:dbstruct-get-rundb-rec dbstruct 1)))
(for-each
(lambda (k)
(test #f #t (begin (dbr:dbstruct-set-runvec! dbstruct 1 k (conc k)) #t))
(test #f k (dbr:dbstruct-get-runvec dbstruct 1 k)))
'(rundb inmem mtime rtime stime inuse))
|
>
>
|
>
>
>
>
>
>
>
>
>
|
|
>
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
(test #f #t (vector? (make-dbr:dbstruct "/tmp")))
(define dbstruct (make-dbr:dbstruct "/tmp"))
(test #f #t (begin (dbr:dbstruct-set-main! dbstruct "blah") #t))
(test #f "blah" (dbr:dbstruct-get-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))
(test #f 2 (dbr:dbstruct-field-name->num 'mtime))
(test #f #f (dbr:dbstruct-get-runvec-val dbstruct 1 'rundb))
(test #f #t (begin (dbr:dbstruct-set-runvec-val! dbstruct 1 'rundb "rundb") #t))
(test #f "rundb" (dbr:dbstruct-get-runvec-val dbstruct 1 'rundb))
(for-each
(lambda (k)
(test #f #t (begin (dbr:dbstruct-set-runvec-val! dbstruct 1 k (conc k)) #t))
(test #f (conc k) (dbr:dbstruct-get-runvec-val dbstruct 1 k)))
'(rundb inmem mtime rtime stime inuse))
|