vector-utils-test.scm 692 B

123456789101112131415161718192021222324252627282930
  1. (use-modules
  2. ;; SRFI 64 for unit testing facilities
  3. (srfi srfi-64)
  4. ;; SRFI 43 for additional vector operations
  5. (srfi srfi-43)
  6. ;; utils - the code to be tested
  7. (utils vector))
  8. (test-begin "vector-utils-test")
  9. (test-group
  10. "vector-take-except-ref"
  11. (test-equal "vector-take-except-ref can work with reference 0"
  12. #(1 2 3 4 5)
  13. (vector-take-except-ref #(0 1 2 3 4 5) 0))
  14. (test-equal "vector-take-except-ref can work with reference in the middle"
  15. #(0 1 2 4 5)
  16. (vector-take-except-ref #(0 1 2 3 4 5) 3))
  17. (test-equal "vector-take-except-ref can work with reference at the end"
  18. #(0 1 2 3 4)
  19. (vector-take-except-ref #(0 1 2 3 4 5) 5)))
  20. (test-end "vector-utils-test")