projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New function: dominate-p
[jscl.git]
/
tests
/
seq.lisp
diff --git
a/tests/seq.lisp
b/tests/seq.lisp
index
c117831
..
1f2ffc2
100644
(file)
--- a/
tests/seq.lisp
+++ b/
tests/seq.lisp
@@
-13,3
+13,9
@@
(let ((v1 (remove-if #'zerop #(1 0 2 0 3))))
(test (and (= (aref v1 0) 1) (= (aref v1 1) 2) (= (aref v1 2) 3))))
(test (every #'zerop (remove-if-not #'zerop #(1 0 2 0 3))))
(let ((v1 (remove-if #'zerop #(1 0 2 0 3))))
(test (and (= (aref v1 0) 1) (= (aref v1 1) 2) (= (aref v1 2) 3))))
(test (every #'zerop (remove-if-not #'zerop #(1 0 2 0 3))))
+
+(let ((nums '(1 2 3 4 5)))
+ (test (equal (subseq nums 3) '(4 5)))
+ (test (equal (subseq nums 2 4) '(3 4)))
+ ; Test that nums hasn't been altered: SUBSEQ should construct fresh lists
+ (test (equal nums '(1 2 3 4 5))))