mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
(length+): New tests.
This commit is contained in:
parent
68eb63f10f
commit
15d36a3438
1 changed files with 17 additions and 0 deletions
|
@ -296,6 +296,23 @@
|
||||||
(equal? 'c
|
(equal? 'c
|
||||||
(drop '(a b . c) 2))))
|
(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
|
;; take
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue