/[gcl]/gcl/ansi-tests/type-of.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/type-of.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by pfdietz, Fri Jun 6 21:23:22 2003 UTC revision 1.5 by pfdietz, Mon Aug 4 13:37:10 2003 UTC
# Line 10  Line 10 
10  ;;;  of which x is a member.  ;;;  of which x is a member.
11    
12  (deftest type-of.1  (deftest type-of.1
13      :notes :type-of/strict-builtins
14    (loop for x in *universe*    (loop for x in *universe*
15          for tp = (type-of x)          for tp = (type-of x)
16          for failures = (loop for tp2 in *cl-all-type-symbols*          for failures = (loop for tp2 in *cl-all-type-symbols*
# Line 19  Line 20 
20          when failures collect (list x failures))          when failures collect (list x failures))
21    nil)    nil)
22    
23    ;;; Some have objected to that (in type-of.1) interpretation
24    ;;; of req. 1.a in the TYPE-OF page, saying that it need hold
25    ;;; for only *one* builtin type that the object is an element of.
26    ;;; This test tests the relaxed requirement.
27    
28    (deftest type-of.1-relaxed
29      (loop for x in *universe*
30            for builtins = (remove x *cl-all-type-symbols*
31                                   :test (complement #'typep))
32            for tp = (type-of x)
33            when (and builtins
34                      (not (loop for tp2 in builtins
35                                 thereis (subtypep tp tp2))))
36            collect x)
37      nil)
38    
39  ;;; 1. For any object that is an element of some built-in type:  ;;; 1. For any object that is an element of some built-in type:
40  ;;;  b. the type returned does not involve and, eql, member, not,  ;;;  b. the type returned does not involve and, eql, member, not,
41  ;;;     or, satisfies, or values.  ;;;     or, satisfies, or values.
# Line 81  Line 98 
98      (eqt (type-of (make-instance class)) class))      (eqt (type-of (make-instance class)) class))
99    t)    t)
100    
   
101  ;;; Error tests  ;;; Error tests
102    
103  (deftest type-of.error.1  (deftest type-of.error.1

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26