Test output for sets [ok]
Testing time: 0s
/home/mario/local/chicken-4.8.0.3/bin/csi -script run.scm < /dev/null Test from group sets-conversion: (let* ((a (list->set (list 0 1 2))) (b (set-copy a))) (set-remove! b 1) (set-remove! b 2) (list (sort (set->list a) <) (set->list b)))... PASS Test from group sets-conversion: (let ((a (list->set (iota 10)))) (set-size a))... PASS Test from group sets-conversion: (sort (set->list (list->set (iota 10))) <)... PASS Test from group sets-size: (let ((a (list->set (list 0 1 2)))) (set-add! a 1) (set-add! a 1) (set-add! a 1) (set-remove! a 2) (sort (set->list a) <))... PASS Test from group sets-for-each: (let ((a (list->set (iota 10))) (sum 0)) (set-for-each (lambda (elt) (set! sum (+ sum elt))) a) sum)... PASS Test from group sets-has-member: (not (set-has-member? (make-empty-set) 0))... PASS Test from group sets-has-member: (let ((a (list->set (list 0)))) (and (set-has-member? a 0) (not (set-has-member? a 1))))... PASS Test from group sets-is-subset: (let ((a (make-empty-set)) (b (make-empty-set))) (set-add! a 0) (set-add! a 1) (set-add! b 0) (set-add! b 1) (set-add! b 2) (and (set-is-subset? (make-empty-set) a) (set-is-subset? (make-empty-set) (make-empty-set)) (not (set-is-subset? a (make-empty-set))) (set-is-subset? a b) (not (set-is-subset? b a)) (set-is-proper-subset? a b) (set-is-subset? b b) (not (set-is-proper-subset? b b))))... PASS Test from group sets-union: (let ((a (list->set (list 0 1 2))) (b (list->set (list 0 3 4)))) (sort (set->list (set-union a b)) <))... PASS Test from group sets-union: (let ((a (list->set (list 0 1 2))) (b (list->set (list 0 3 4)))) (set-union! a b) (sort (set->list a) <))... PASS Test from group sets-difference: (let ((a (list->set (list 0 1 2))) (b (list->set (list 0 3 4)))) (sort (set->list (set-difference a b)) <))... PASS Test from group sets-difference: (let ((a (list->set (list 0 1 2))) (b (list->set (list 0 3 4)))) (set-difference! a b) (sort (set->list a) <))... PASS Test from group sets-intersection: (let ((a (list->set (list 0 1 2))) (b (list->set (list 0 3 4)))) (set->list (set-intersection a b)))... PASS Test from group sets-intersection: (let ((a (list->set (list 0 1 2))) (b (list->set (list 0 3 4)))) (set-intersection! a b) (set->list a))... PASS