;;;; slib-arraymap-test.scm ;;;; Kon Lovett, Mar '20 (import test) (test-begin "Arraymap (SLIB)") (import slib-arraymap) (import (chicken base)) (import (chicken type)) (import (srfi 63)) ;; (test-assert "TBD array-map!" array-map!) (test-assert "TBD array-map" array-map) (test-assert "TBD array-for-each" array-for-each) (test-assert "TBD array-indexes" array-indexes) (test-assert "TBD array-index-for-each" array-index-for-each) (test-assert "TBD array-index-map!" array-index-map!) (test-assert "TBD array-copy!" array-copy!) (let* ((src (list->array 2 #() '((1 2) (3 4)))) (cpy (array-copy src)) ) (test-assert "array-copy a copy" (not (eq? src cpy))) (test "array-copy equals" src cpy) ) (test "array-fold sum" 36 (array-fold (cut + <> <> <>) 0 (list->array 2 #() '((1 2) (3 4))) (list->array 2 #() '((5 6) (7 8))))) ;; (test-end "Arraymap (SLIB)") (test-exit)