Last change
on this file since 8991 was
8991,
checked in by gz, 12 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  (inpackage :cltest) 

7  

8  (compileandload "typesaux.lsp") 

9  

10  (deftest subtypep.eql.1 

11  (let ((s1 (copyseq "abc")) 

12  (s2 (copyseq "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 (checkdisjointness t1 t2))))) 

19  nil) 

20  

21  (deftest subtypep.eql.2 

22  (let ((s1 (copyseq '(a b c))) 

23  (s2 (copyseq '(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 (checkdisjointness t1 t2))))) 

30  nil) 

31  

32  (deftest subtypep.eql.3 

33  (let ((i1 (1+ mostpositivefixnum)) 

34  (i2 (1+ mostpositivefixnum))) 

35  (checkequivalence `(eql ,i1) `(eql ,i2))) 

36  nil) 

37  

38  (deftest subtypep.eql.4 

39  (checkequivalence '(and (eql a) (eql b)) nil) 

40  nil) 

41  

42  (deftest subtypep.eql.5 

43  (checkallsubtypep '(eql a) '(satisfies symbolp)) 

44  nil) 

45  

46  (deftest subtypep.eql.6 

47  (checkdisjointness '(eql 17) '(satisfies symbolp)) 

48  nil) 

49  

50  (deftest subtypep.eql.7 

51  (checkallsubtypep '(eql nil) '(satisfies symbolp)) 

52  nil) 

53  

54  (deftest subtypep.eql.8 

55  (checkallnotsubtypep '(satisfies symbolp) '(eql a)) 

56  nil) 

Note: See
TracBrowser
for help on using the repository browser.