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
ac007919
Commit
ac007919
authored
May 29, 2005
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for DECLARATION
parent
af26966c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
0 deletions
+89
-0
ansi-tests/declaration.lsp
ansi-tests/declaration.lsp
+88
-0
ansi-tests/load-eval-and-compile.lsp
ansi-tests/load-eval-and-compile.lsp
+1
-0
No files found.
ansi-tests/declaration.lsp
0 → 100644
View file @
ac007919
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun May 29 07:16:15 2005
;;;; Contains: Tests of the DECLARATION declarations
(in-package :cl-test)
(deftest declaration.1
(progn (declaim (declaration)) nil)
nil)
(deftest declaration.2
(progn (proclaim '(declaration)) nil)
nil)
(deftest declaration.3
(let ((sym (gensym))
(sym2 (gensym)))
(proclaim `(declaration ,sym ,sym2))
nil)
nil)
;;; For the error tests, see the page in the CLHS for TYPE.
;;; "A symbol cannot be both the name of a type and the name
;;; of a declaration. Defining a symbol as the name of a class,
;;; structure, condition, or type, when the symbol has been
;;; declared as a declaration name, or vice versa, signals an error."
(deftest declaration.4
(let ((sym (gensym)))
(proclaim `(declaration ,sym))
(eval `(signals-error-always (deftype ,sym () t) error)))
t t)
(deftest declaration.5
(let ((sym (gensym)))
(proclaim `(declaration ,sym))
(eval `(signals-error-always (defstruct ,sym a b c) error)))
t t)
(deftest declaration.6
(let ((sym (gensym)))
(proclaim `(declaration ,sym))
(eval `(signals-error-always (defclass ,sym () (a b c)) error)))
t t)
(deftest declaration.7
(let ((sym (gensym)))
(proclaim `(declaration ,sym))
(eval `(signals-error-always (define-condition ,sym (condition) (a b c))
error)))
t t)
(deftest declaration.8
(let ((sym (gensym)))
(eval `(deftype ,sym () error))
(eval `(signals-error-always (proclaim '(declaration ,sym))
error)))
t t)
(deftest declaration.9
(let ((sym (gensym)))
(eval `(defstruct ,sym a b c) error)
(eval `(signals-error-always (proclaim '(declaration ,sym))
error)))
t t)
(deftest declaration.10
(let ((sym (gensym)))
(eval `(defclass ,sym () (a b c)))
(eval `(signals-error-always (proclaim '(declaration ,sym))
error)))
t t)
(deftest declaration.11
(let ((sym (gensym)))
(eval `(define-condition ,sym (condition) (a b c)))
(eval `(signals-error-always (proclaim '(declaration ,sym))
error)))
t t)
ansi-tests/load-eval-and-compile.lsp
View file @
ac007919
...
...
@@ -21,3 +21,4 @@
(load "special.lsp")
(load "macroexpand.lsp")
(load "macroexpand-1.lsp")
(load "declaration.lsp")
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