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
c83bb559
Commit
c83bb559
authored
Jan 10, 2003
by
pfdietz
Browse files
More make-array tests, for displaced arrays with various element types.
parent
cc748d59
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/make-array.lsp
View file @
c83bb559
...
...
@@ -404,3 +404,61 @@
:displaced-to a
:displaced-index-offset 10))
#*)
(deftest make-array.displaced.11
(let ((a (make-array '(10) :element-type 'base-char
:initial-contents "abcdefghij")))
(make-array-with-checks '(5) :element-type 'base-char
:displaced-to a))
"abcde")
(deftest make-array.displaced.12
(let ((a (make-array '(10) :element-type 'base-char
:initial-contents "abcdefghij")))
(loop for i from 0 to 5 collect
(make-array-with-checks '(5) :element-type 'base-char
:displaced-to a
:displaced-index-offset i)))
("abcde"
"bcdef"
"cdefg"
"defgh"
"efghi"
"fghij"))
(deftest make-array.displaced.13
(let ((a (make-array '(10) :element-type 'base-char
:initial-contents "abcdefghij")))
(make-array-with-checks '(0) :element-type 'base-char
:displaced-to a
:displaced-index-offset 10))
"")
(deftest make-array.displaced.14
(let ((a (make-array '(10) :element-type 'character
:initial-contents "abcdefghij")))
(make-array-with-checks '(5) :element-type 'character
:displaced-to a))
"abcde")
(deftest make-array.displaced.15
(let ((a (make-array '(10) :element-type 'character
:initial-contents "abcdefghij")))
(loop for i from 0 to 5 collect
(make-array-with-checks '(5) :element-type 'character
:displaced-to a
:displaced-index-offset i)))
("abcde"
"bcdef"
"cdefg"
"defgh"
"efghi"
"fghij"))
(deftest make-array.displaced.16
(let ((a (make-array '(10) :element-type 'character
:initial-contents "abcdefghij")))
(make-array-with-checks '(0) :element-type 'character
:displaced-to a
:displaced-index-offset 10))
"")
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