Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
187c700e
Commit
187c700e
authored
Jan 13, 2003
by
pfdietz
Browse files
Added tests for :allow-other-keys and for multidimensional displaced arrays.
parent
9d16c8d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/make-array.lsp
View file @
187c700e
...
...
@@ -266,6 +266,17 @@
(make-array-with-checks '(5) :initial-element 'a :displaced-to nil)
#(a a a a a))
(deftest make-array.25
(make-array '(4) :initial-element 'x :nonsense-argument t
:allow-other-keys t)
#(x x x x))
(deftest make-array.26
(make-array '(4) :initial-element 'x
:allow-other-keys nil)
#(x x x x))
;;; Adjustable arrays
...
...
@@ -462,3 +473,27 @@
:displaced-to a
:displaced-index-offset 10))
"")
;;; Multidimensional displaced arrays
(deftest make-array.displaced.17
(let ((a (make-array '(3 4) :initial-contents '((1 2 3 4) (5 6 7 8)
(9 10 11 12)))))
(make-array-with-checks '(8) :displaced-to a))
#(1 2 3 4 5 6 7 8))
(deftest make-array.displaced.18
(let ((a (make-array '(3 4) :initial-contents '((1 2 3 4) (5 6 7 8)
(9 10 11 12)))))
(make-array-with-checks '(8) :displaced-to a
:displaced-index-offset 3))
#(4 5 6 7 8 9 10 11))
(deftest make-array.displaced.19
(let ((a (make-array '(3 4) :initial-contents '((1 2 3 4) (5 6 7 8)
(9 10 11 12)))))
(make-array-with-checks '(2 4) :displaced-to a
:displaced-index-offset 4))
#2a((5 6 7 8) (9 10 11 12)))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment