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
Package registry
Container registry
Model registry
Operate
Terraform modules
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
Mark Evenson
ansi-test
Commits
64702b24
Commit
64702b24
authored
21 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Added tests for SLOT-MISSING.
parent
cc13e5d6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansi-tests/load-objects.lsp
+1
-0
1 addition, 0 deletions
ansi-tests/load-objects.lsp
ansi-tests/slot-missing.lsp
+68
-0
68 additions, 0 deletions
ansi-tests/slot-missing.lsp
with
69 additions
and
0 deletions
ansi-tests/load-objects.lsp
+
1
−
0
View file @
64702b24
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
(load "slot-boundp.lsp")
(load "slot-boundp.lsp")
(load "slot-exists-p.lsp")
(load "slot-exists-p.lsp")
(load "slot-makunbound.lsp")
(load "slot-makunbound.lsp")
(load "slot-missing.lsp")
(load "slot-value.lsp")
(load "slot-value.lsp")
(load "method-qualifiers.lsp")
(load "method-qualifiers.lsp")
(load "no-applicable-method.lsp")
(load "no-applicable-method.lsp")
...
...
This diff is collapsed.
Click to expand it.
ansi-tests/slot-missing.lsp
0 → 100644
+
68
−
0
View file @
64702b24
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun Jun 15 06:03:58 2003
;;;; Contains: Tests of SLOT-MISSING
(in-package :cl-test)
(defclass slot-missing-class-01 ()
(a b c))
(defmethod slot-missing ((class t) (obj slot-missing-class-01)
(slot-name t) (operation t)
&optional (new-value nil new-value-p))
(list slot-name operation new-value (notnot new-value-p)))
(deftest slot-missing.1
(let ((obj (make-instance 'slot-missing-class-01)))
(slot-value obj 'foo))
(foo slot-value nil nil))
(deftest slot-missing.2
(let ((obj (make-instance 'slot-missing-class-01)))
(setf (slot-value obj 'foo) 'bar))
(foo setf bar t))
(deftest slot-missing.3
(let ((obj (make-instance 'slot-missing-class-01)))
(slot-makunbound obj 'xyz))
(xyz slot-makunbound nil nil))
(deftest slot-missing.4
(let ((obj (make-instance 'slot-missing-class-01)))
(slot-boundp obj 'abc))
(abc slot-boundp nil nil))
(deftest slot-missing.5
(let ((obj (make-instance 'slot-missing-class-01)))
(slot-value obj 'd))
(d slot-value nil nil))
(deftest slot-missing.6
(let ((obj (make-instance 'slot-missing-class-01)))
(setf (slot-value obj 'd) 'bar))
bar)
(deftest slot-missing.7
(let* ((obj (make-instance 'slot-missing-class-01))
(val (slot-makunbound obj 'd)))
(if (eq val obj)
:good
val))
:good)
(defmethod slot-missing ((class t) (obj slot-missing-class-01)
(slot-name (eql 'not-there))
(operation (eql 'slot-boundp))
&optional new-value)
(declare (ignore new-value))
(values nil :ignore-this))
(deftest slot-missing.8
(let* ((obj (make-instance 'slot-missing-class-01)))
(slot-boundp obj 'not-there))
nil)
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