source: trunk/source/tests/ansi-tests/subtypep-eql.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 11 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 1.3 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Feb 15 11:58:43 2003
4;;;; Contains: Tests for subtype relationships on EQL types
5
6(in-package :cl-test)
7
8(compile-and-load "types-aux.lsp")
9
10(deftest subtypep.eql.1
11  (let ((s1 (copy-seq "abc"))
12        (s2 (copy-seq "abc")))
13    (let ((t1 `(eql ,s1))
14          (t2 `(eql ,s2)))
15      (cond
16       ((subtypep t1 t2) "T1 is subtype of T2")
17       ((subtypep t2 t1) "T2 is subtype of T1")
18       (t (check-disjointness t1 t2)))))
19  nil)
20   
21(deftest subtypep.eql.2
22  (let ((s1 (copy-seq '(a b c)))
23        (s2 (copy-seq '(a b c))))
24    (let ((t1 `(eql ,s1))
25          (t2 `(eql ,s2)))
26      (cond
27       ((subtypep t1 t2) "T1 is subtype of T2")
28       ((subtypep t2 t1) "T2 is subtype of T1")
29       (t (check-disjointness t1 t2)))))
30  nil)
31
32(deftest subtypep.eql.3
33  (let ((i1 (1+ most-positive-fixnum))
34        (i2 (1+ most-positive-fixnum)))
35    (check-equivalence `(eql ,i1) `(eql ,i2)))
36  nil)
37
38(deftest subtypep.eql.4
39  (check-equivalence '(and (eql a) (eql b)) nil)
40  nil)
41
42(deftest subtypep.eql.5
43  (check-all-subtypep '(eql a) '(satisfies symbolp))
44  nil)
45
46(deftest subtypep.eql.6
47  (check-disjointness '(eql 17) '(satisfies symbolp))
48  nil)
49
50(deftest subtypep.eql.7
51  (check-all-subtypep '(eql nil) '(satisfies symbolp))
52  nil)
53
54(deftest subtypep.eql.8
55  (check-all-not-subtypep '(satisfies symbolp) '(eql a))
56  nil)
Note: See TracBrowser for help on using the repository browser.