12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- (use-modules
- ;; SRFI 64 for unit testing facilities
- (srfi srfi-64)
- ;; utils - the code to be tested
- ((helpers list-helpers)))
- (test-begin "list-helpers-test")
- (test-group
- "longest-sublist-length-test"
- (test-eqv 0 (longest-sublist-length
- '()))
- (test-eqv 7 (longest-sublist-length
- '((1 2 3 4 5 6 (a b c d (e) f g h))
- (a)
- (b c d (1 2 3 4 5) e)
- (c)
- (d e f))))
- (test-eqv 6 (longest-sublist-length
- '((1 2 3 4 5 6)
- (a)
- (b c d (1 2 3 4 5) e)
- (c)
- (d e f))))
- (test-eqv 5 (longest-sublist-length
- '((a)
- (b c d (1 2 3 4 5) e)
- (c)
- (d e f)))))
- (test-group
- "dimensionality-test"
- (test-eqv 0 (dimendionality
- '()))
- (test-eqv 1 (dimendionality
- '(1 2 3)))
- (test-eqv 2 (dimendionality
- '((1 2) (3 4))))
- (test-eqv 3 (dimendionality
- '(1 2 (34 5 6) 3 (4 5 (3 ())))))
- (test-eqv 3 (dimendionality
- '(1 2 (34 5 6 ()) 3 (4 5 (3 ())))))
- (test-eqv 3 (dimendionality
- '(1 2 (34 5 6 (213)) 3 (4 5 (3 ())))))
- (test-eqv 3 (dimendionality
- '(1 2 (34 5 6 (213 ())) 3 (4 5 (3 ())))))
- (test-eqv 4 (dimendionality
- '(1 2 (34 5 6 (213 (1))) 3 (4 5 (3 ()))))))
- (test-end "list-helpers-test")
|