Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ansi-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michał Herda
ansi-test
Commits
328bdcea
Commit
328bdcea
authored
19 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Make setf-getf.order.1 have more useful output
parent
4a31ad07
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansi-tests/getf.lsp
+16
-17
16 additions, 17 deletions
ansi-tests/getf.lsp
with
16 additions
and
17 deletions
ansi-tests/getf.lsp
+
16
−
17
View file @
328bdcea
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
(progn (setf y (incf i)) 'a)
(progn (setf y (incf i)) 'a)
(setf z (incf i)))
(setf z (incf i)))
i x y z))
i x y z))
b 3 1 2 3)
b 3 1 2 3)
(deftest setf-getf.1
(deftest setf-getf.1
(let ((p (copy-list '(a 1 b 2))))
(let ((p (copy-list '(a 1 b 2))))
...
@@ -127,24 +127,23 @@
...
@@ -127,24 +127,23 @@
(deftest setf-getf.order.1
(deftest setf-getf.order.1
(let ((p (list (copy-list '(a 1 b 2))))
(let ((p (list (copy-list '(a 1 b 2))))
(cnt1 0) (cnt2 0) (cnt3 0))
(cnt1 0) (cnt2 0) (cnt3 0))
(setf (getf (car (progn (incf cnt1) p)) 'c (incf cnt3))
(setf (getf (car (progn (incf cnt1) p)) 'c (incf cnt3))
(progn (incf cnt2) 3))
(progn (incf cnt2) 3))
;; Must check that only a, b, c have properties
;; Must check that only a, b, c have properties
(and
(values
(eqlt cnt1 1)
cnt1 ; (eqlt cnt1 1)
(eqlt cnt2 1)
cnt2 ; (eqlt cnt2 1)
(eqlt cnt3 1)
cnt3 ; (eqlt cnt3 1)
(eqlt (getf (car p) 'a) 1)
(getf (car p) 'a)
(eqlt (getf (car p) 'b) 2)
(getf (car p) 'b)
(eqlt (getf (car p) 'c) 3)
(getf (car p) 'c)
(eqlt
(loop
(loop
for ptr on (car p) by #'cddr count
for ptr on (car p) by #'cddr count
(not (member (car ptr) '(a b c))))))
(not (member (car ptr) '(a b c))))
1 1 1
0)
1 2 3
t))
0)
t)
(deftest setf-getf.order.2
(deftest setf-getf.order.2
(let ((p (list (copy-list '(a 1 b 2))))
(let ((p (list (copy-list '(a 1 b 2))))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment