1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

(length+): New tests.

This commit is contained in:
Kevin Ryde 2003-07-28 23:51:41 +00:00
parent 68eb63f10f
commit 15d36a3438

View file

@ -296,6 +296,23 @@
(equal? 'c
(drop '(a b . c) 2))))
;;
;; length+
;;
(with-test-prefix "length+"
(pass-if-exception "too few args" exception:wrong-num-args
(length+))
(pass-if-exception "too many args" exception:wrong-num-args
(length+ 123 456))
(pass-if (= 0 (length+ '())))
(pass-if (= 1 (length+ '(x))))
(pass-if (= 2 (length+ '(x y))))
(pass-if (= 3 (length+ '(x y z))))
(pass-if (not (length+ (circular-list 1))))
(pass-if (not (length+ (circular-list 1 2))))
(pass-if (not (length+ (circular-list 1 2 3)))))
;;
;; take
;;