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
22133eb6
Commit
22133eb6
authored
22 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Added tests for (TYPEP ... 'FUNCTION) that are similar to the tests for FUNCTIONP.
parent
99d8a2b1
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/function.lsp
+68
-0
68 additions, 0 deletions
ansi-tests/function.lsp
ansi-tests/gclload2.lsp
+1
-0
1 addition, 0 deletions
ansi-tests/gclload2.lsp
with
69 additions
and
0 deletions
ansi-tests/function.lsp
0 → 100644
+
68
−
0
View file @
22133eb6
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Mon Oct 7 07:34:29 2002
;;;; Contains: Tests for type FUNCTION
(in-package :cl-test)
;;;
;;; Note! There are significant incompatibilities between CLTL1 and ANSI CL
;;; in the meaning of FUNCTION and FUNCTIONP.
;;;
(deftest function.1
(typep nil 'function)
nil)
(deftest function.2
(typep 'identity 'function)
nil)
(deftest function.3
(not (typep #'identity 'function))
nil)
(deftest function.4
(loop for x in *cl-symbol-names*
for s = (find-symbol x "CL")
for f = (and (fboundp s) (symbol-function s))
always (or (null f)
(typep f 'function)
))
t)
(deftest function.5
(typep '(setf car) 'function)
nil)
(deftest function.6
(typep '(lambda (x) x) 'function)
nil)
(deftest function.7
(not (typep #'(setf car) 'function))
nil)
(deftest function.8
(not (typep #'(lambda (x) x) 'function))
nil)
(deftest function.9
(not (typep (compile nil '(lambda (x) x)) 'function))
nil)
(deftest function.10
(loop for x in *universe*
never
(and (or (numberp x) (characterp x) (symbolp x) (consp x)
(typep x 'array))
(typep x 'function)))
t)
(deftest function.11
(flet ((%f () nil)) (typep '%f 'function))
nil)
(deftest function.12
(flet ((%f () nil)) (not (typep #'%f 'function)))
nil)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ansi-tests/gclload2.lsp
+
1
−
0
View file @
22133eb6
...
...
@@ -8,6 +8,7 @@
(load "constantly.lsp")
(load "complement.lsp")
(load "setf-apply.lsp")
(load "function.lsp")
(load "functionp.lsp")
;;; Tests of conses
...
...
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