Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ansi-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karsten Poeck
ansi-test
Commits
335a07ee
Commit
335a07ee
authored
Jan 10, 2003
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for COPY-STRUCTURE
parent
8f742603
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
ansi-tests/structure-00.lsp
ansi-tests/structure-00.lsp
+25
-1
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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