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
335a07ee
Commit
335a07ee
authored
Jan 10, 2003
by
pfdietz
Browse files
Added tests for COPY-STRUCTURE
parent
8f742603
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/structure-00.lsp
View file @
335a07ee
...
...
@@ -364,7 +364,7 @@ do the defstruct."
`((deftest ,(make-struct-test-name name 9)
,(let* ((var 'XTEMP-9)
(var2 'YTEMP-9)
(var3 'ZTEMP-9))
(var3 'ZTEMP-9))
`(let ((,var (,make-fn
,@(loop
for (slot-name . initval)
...
...
@@ -470,6 +470,30 @@ do the defstruct."
(let ((doc (documentation ',name 'type)))
(or (null doc) (equalt doc ',doc-string)))
t))
;; Test that COPY-STRUCTURE works, if this is a structure
;; type
,@(unless type-option
`((deftest ,(make-struct-test-name name 20)
,(let* ((var 'XTEMP-20)
(var2 'YTEMP-20))
`(let ((,var (,make-fn
,@(loop
for (slot-name . initval)
in initial-value-alist
nconc (list (intern (string slot-name)
"KEYWORD")
`(quote ,initval))))))
(let ((,var2 (copy-structure ,var)))
(and
(not (eqlt ,var ,var2))
,@(loop
for (slot-name . nil) in initial-value-alist
for fn in field-fns
collect
`(eqlt (,fn ,var) (,fn ,var2)))
t))))
t)))
nil
)))
...
...
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