;; -*- compile-command: "guile -L . nsd-test.scm"; -*- (use-modules (srfi srfi-64) (nsd)) (test-begin "harness") (test-equal "calculate-seq-length 1x1" 1 (calculate-seq-length 1)) (test-equal "calculate-seq-length 3x3" 5 (calculate-seq-length 3)) (test-equal "calculate-seq-length 5x5" 9 (calculate-seq-length 5)) (test-equal "nsd-generator size 1" '(1) (nsd-generator 1)) (test-equal "nsd-generator size 2" '(1 3) (nsd-generator 2)) (test-equal "nsd-generator max two inc" '(1 3 5 7 9) (nsd-generator 5)) (test-equal "nsd-generator four inc" '(1 3 5 7 9 13) (nsd-generator 6)) (test-equal "nsd-generator six inc" '(1 3 5 7 9 13 17 21 25 31) (nsd-generator 10)) (test-equal "nsd-generator eight inc" '(1 3 5 7 9 13 17 21 25 31 37 43 49 57) (nsd-generator 14)) (test-equal "nsd add 1x1" 1 (nsd 1)) (test-equal "nsd add 3x3" 25 (nsd 3)) (test-equal "nsd add 7x7" 261 (nsd 7)) (test-end "harness")