source: project/release/5/simple-cells/tags/1.1/tests/run.scm @ 36750

Last change on this file since 36750 was 36750, checked in by juergen, 6 months ago

simple-cells 1.1 now accepts zero or many predicates in cell-of?

File size: 679 bytes
Line 
1(import simple-cells simple-exceptions simple-tests)
2
3  (define o% (cell 5 integer? odd?))
4  (define n% (cell 4 (named-lambda (3<=? x) (<= 3 x))))
5  (define lst (map cell '(0 1 2 3 4)))
6
7(define-test (Cells?)
8  ;(define o% (cell 5 integer? odd?))
9  (cell? o%)
10  ((cell-of? number?) o%)
11  (not ((cell-of? number? even?) o%))
12  (not (condition-case (o% 4) ((exn argument) #f)))
13  (= (o%) 5)
14  ;(define n% (cell 4 (named-lambda (3<=? x) (<= 3 x))))
15  (= (n%) 4)
16  (= (n% 20) 4)
17  (= (n%) 20)
18  (= (o%) 5)
19  ;(define lst (map cell '(0 1 2 3 4)))
20  (= ((list-ref lst 3)) 3)
21  (= ((list-ref lst 3) 30) 3)
22  (= ((list-ref lst 3)) 30)
23  )
24
25
26(compound-test (SIMPLE-CELLS)
27  (Cells?)
28  )
29
Note: See TracBrowser for help on using the repository browser.