Test output for messages [ok]

Testing time: 5s

'/usr/home/chicken/salmonella/build/salmonella-run-publish/chicken/bin/csi' -script run.scm < /dev/null 2>&1
unctional-vectors
-----------------
(fvector? fv0)
... passed in (fvectors?)
(not (fvector? (vector 0 1 2)))
... passed in (fvectors?)
(fvector? fv1)
... passed in (fvectors?)
(not (fvector? (vector 0 1 (vector 2 3))))
... passed in (fvectors?)
(equal? (fvector-data fv0) '(0 1 2))
... passed in (fvectors?)
(equal? (fvector-data fv1) '(0 1 (2 3)))
... passed in (fvectors?)

messages
--------
(message? msg)
... passed in (messages?)
(not (message? #(0 1 2)))
... passed in (messages?)
((message-of? #:Type) msg)
... passed in (messages?)
(not ((message-of? #:Bar) msg))
... passed in (messages?)
(eq? (message-type msg) #:Type)
... passed in (messages?)
(eq? (message-key msg) #:foo)
... passed in (messages?)
(equal? (message-data msg) #(0 1 2))
... passed in (messages?)

variable arguments
------------------
((Foo #:?) foo)
... passed in (vargs?)
(zero? (case-variant Foo foo (#:make (x xs) x) (else #f)))
... passed in (vargs?)
(equal? (case-variant Foo foo (#:make (x xs) xs) (else #f)) '(1 2 3))
... passed in (vargs?)

options
-------
(not (case-variant Option ((Option #:none)) (#:none () #f) (#:some (arg) arg)))
... passed in (options?)
(= (case-variant Option ((Option #:some) 5) (#:none () #f) (#:some (arg) arg))
   5)
... passed in (options?)
(not (case-variant
       Option
       ((Option #:some) #f)
       (#:none () #f)
       (#:some (arg) arg)))
... passed in (options?)
((Option #:?) ((Option #:none)))
... passed in (options?)
((Option #:?) ((Option #:some) 5))
... passed in (options?)
(= (qux ((Option #:some) 5)) 5)
... passed in (options?)

Slists
------
((Slist #:?) sl)
... passed in (slists?)
((Slist #:?) (Slist-subst 'new 'old sl))
... passed in (slists?)
((Sexpr #:?) sx)
... passed in (slists?)
((Sexpr #:?) (Slist-subst 'new 'old sx))
... passed in (slists?)
((Slist #:?) sxl)
... passed in (slists?)
((Slist #:?) (Slist-subst 'new 'old sxl))
... passed in (slists?)
((Slist #:?) sxx)
... passed in (slists?)
((Slist #:?) (Slist-subst 'new 'old sxx))
... passed in (slists?)
((Slist #:?) sll)
... passed in (slists?)
((Slist #:?) (Slist-subst 'new 'old sll))
... passed in (slists?)
((Slist #:?) xxx)
... passed in (slists?)
((Slist #:?) (Slist-subst 'new 'old xxx))
... passed in (slists?)
(null? (Slist-out sl))
... passed in (slists?)
(null? (Slist-out (Slist-subst 'new 'old sl)))
... passed in (slists?)
(eq? (Slist-out sx) 'old)
... passed in (slists?)
(eq? (Slist-out (Slist-subst 'new 'old sx)) 'new)
... passed in (slists?)
(equal? (Slist-out sxl) '(old))
... passed in (slists?)
(equal? (Slist-out (Slist-subst 'new 'old sxl)) '(new))
... passed in (slists?)
(equal? (Slist-out sxx) '(()))
... passed in (slists?)
(equal? (Slist-out (Slist-subst 'new 'old sxx)) '(()))
... passed in (slists?)
(equal? (Slist-out sll) '((old c) (old () d)))
... passed in (slists?)
(equal? (Slist-out (Slist-subst 'new 'old sll)) '((new c) (new () d)))
... passed in (slists?)
(equal? (Slist-out xxx) '(old ((old) ((old x)) y)))
... passed in (slists?)
(equal? (Slist-out (Slist-subst 'new 'old xxx)) '(new ((new) ((new x)) y)))
... passed in (slists?)

Tuples
------
((Triple #:?) trp)
... passed in (tuples?)
(not ((Couple #:?) trp))
... passed in (tuples?)
(not ((Single #:?) trp))
... passed in (tuples?)
((Couple #:?) sgl)
... passed in (tuples?)
((Triple #:?) sgl)
... passed in (tuples?)
((Triple #:?) cpl)
... passed in (tuples?)
(= 1
   (let* ((cpl (case-variant Triple trp (#:maker (parent z) parent)))
          (sgl (case-variant Couple cpl (#:maker (parent y) parent))))
     (case-variant Single sgl (#:maker (x) x))))
... passed in (tuples?)
(= 2
   (let ((cpl (case-variant Triple trp (#:maker (parent z) parent))))
     (case-variant Couple cpl (#:maker (parent y) y))))
... passed in (tuples?)
(= 3 (case-variant Triple trp (#:maker (parent z) z)))
... passed in (tuples?)

immutable typed lists as abstract types
---------------------------------------
((List #:?) as0123)
... passed in (abstract-lists?)
(not ((List #:?) '(a b c)))
... passed in (abstract-lists?)
(not ((List #:null?) as0123))
... passed in (abstract-lists?)
((List #:null?) ((List #:maker)))
... passed in (abstract-lists?)
(= 2 ((List #:ref) as0123 2))
... passed in (abstract-lists?)
(= 2 ((List #:ref) ((List #:tail) as0123 2) 0))
... passed in (abstract-lists?)
((List #:null?) ((List #:tail) as0123 4))
... passed in (abstract-lists?)
(not (condition-case ((List #:ref) as0123 5) ((exn sequence) #f)))
... passed in (abstract-lists?)

mutable points as abstract types
--------------------------------
(not (condition-case ((Point #:maker) 10 20) ((exn) #f)))
... passed in (mutable-points?)
(= ((Point #:x) pt) 1)
... passed in (mutable-points?)
(= ((Point #:x!) pt 10) 1)
... passed in (mutable-points?)
(= ((Point #:x) pt) 10)
... passed in (mutable-points?)
(= ((Point #:y) pt) 2)
... passed in (mutable-points?)
(= ((Point #:y!) pt 20) 2)
... passed in (mutable-points?)
(= ((Point #:y) pt) 20)
... passed in (mutable-points?)
((Point #:?) pt)
... passed in (mutable-points?)
(not ((Point #:?) 5))
... passed in (mutable-points?)

Rects and Squares as object types
---------------------------------
(Rect-instance? rect)
... passed in (object-types?)
(message? ((Rect #:x)))
... passed in (object-types?)
(= (rect ((Rect #:x))) 0)
... passed in (object-types?)
(zero? (rect ((Rect #:y))))
... passed in (object-types?)
(= (rect ((Rect #:w!) 5)) 1)
... passed in (object-types?)
(= (rect ((Rect #:w))) 5)
... passed in (object-types?)
(= (rect ((Rect #:h))) 1)
... passed in (object-types?)
(rect ((Rect #:invariant?)))
... passed in (object-types?)
(= 1 (square ((Square #:w))))
... passed in (object-types?)
(= 1 (square ((Square #:w!) 50)))
... passed in (object-types?)
(= 50 (square ((Square #:w))))
... passed in (object-types?)
(= 50 (square ((Square #:h))))
... passed in (object-types?)
(= (rect ((Rect #:w))) 5)
... passed in (object-types?)
(= (rect ((Rect #:h))) 1)
... passed in (object-types?)
(square ((Square #:invariant?)))
... passed in (object-types?)
(square ((Rect #:invariant?)))
... passed in (object-types?)
(Bar-instance? bar)
... passed in (object-types?)
(not (Bar-instance? square))
... passed in (object-types?)
(equal? (bar ((Bar #:xs))) '(1 2 3))
... passed in (object-types?)
(bar ((Bar #:invariant?)))
... passed in (object-types?)
(not (Baz-instance? bar))
... passed in (object-types?)
(Baz-instance? baz)
... passed in (object-types?)
(zero? (baz ((Baz #:x))))
... passed in (object-types?)
(equal? (baz ((Baz #:xs))) '(1 2 3))
... passed in (object-types?)
(baz ((Baz #:invariant?)))
... passed in (object-types?)

Testing DATATYPES ...
----------------------------

Results of DATATYPES
----------------------------
All tests passed