mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
(make-list): New tests.
This commit is contained in:
parent
ab661b7073
commit
1d936c056b
1 changed files with 27 additions and 0 deletions
|
@ -130,6 +130,33 @@
|
|||
(y (apply list x)))
|
||||
(not (eq? x y)))))
|
||||
|
||||
;;; make-list
|
||||
|
||||
(with-test-prefix "make-list"
|
||||
|
||||
(pass-if "documented?"
|
||||
(documented? make-list))
|
||||
|
||||
(with-test-prefix "no init"
|
||||
(pass-if "0"
|
||||
(equal? '() (make-list 0)))
|
||||
(pass-if "1"
|
||||
(equal? '(()) (make-list 1)))
|
||||
(pass-if "2"
|
||||
(equal? '(() ()) (make-list 2)))
|
||||
(pass-if "3"
|
||||
(equal? '(() () ()) (make-list 3))))
|
||||
|
||||
(with-test-prefix "with init"
|
||||
(pass-if "0"
|
||||
(equal? '() (make-list 0 'foo)))
|
||||
(pass-if "1"
|
||||
(equal? '(foo) (make-list 1 'foo)))
|
||||
(pass-if "2"
|
||||
(equal? '(foo foo) (make-list 2 'foo)))
|
||||
(pass-if "3"
|
||||
(equal? '(foo foo foo) (make-list 3 'foo)))))
|
||||
|
||||
;;; cons*
|
||||
|
||||
(with-test-prefix "cons*"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue