source: trunk/source/tests/ansi-tests/simple-string.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.8 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Aug 29 17:27:46 2004
4;;;; Contains: Tests associated with SIMPLE-STRING
5
6(in-package :cl-test)
7
8(deftest simple-string.1
9  (subtypep* 'simple-string 'string)
10  t t)
11
12(deftest simple-string.2
13  (subtypep* 'simple-string 'vector)
14  t t)
15
16(deftest simple-string.3
17  (subtypep* 'simple-string 'simple-array)
18  t t)
19
20(deftest simple-string.4
21  (subtypep* 'simple-string 'array)
22  t t)
23
24(deftest simple-string.5
25  (subtypep* 'simple-string 'sequence)
26  t t)
27
28(deftest simple-string.6
29  (subtypep* 'simple-string '(simple-array * (*)))
30  t t)
31
32(deftest simple-string.7
33  (subtypep* 'simple-string '(simple-array * 1))
34  t t)
35
36(deftest simple-string.8
37  :notes (:nil-vectors-are-strings)
38  (subtypep* 'simple-string '(simple-array character (*)))
39  nil t)
40
41(deftest simple-string.9
42  :notes (:nil-vectors-are-strings)
43  (subtypep* 'simple-string '(simple-array base-char (*)))
44  nil t)
45
46(deftest simple-string.10
47  :notes (:nil-vectors-are-strings)
48  (subtypep* 'simple-string 'simple-base-string)
49  nil t)
50
51(deftest simple-string.11
52  :notes (:nil-vectors-are-strings)
53  (subtypep* '(simple-array nil (*)) 'simple-string)
54  t t)
55
56(deftest simple-string.12
57  :notes (:nil-vectors-are-strings)
58  (typep* (make-array '(0) :element-type nil) 'simple-string)
59  t)
60
61(deftest simple-string.13
62  :notes (:nil-vectors-are-strings)
63  (typep* (make-array '(12) :element-type nil) 'simple-string)
64  t)
65
66(deftest simple-string.14
67  (typep* "abc" '(simple-string))
68  t)
69
70(deftest simple-string.15
71  (typep* "abc" '(simple-string *))
72  t)
73
74(deftest simple-string.16
75  (typep* "abc" '(simple-string 3))
76  t)
77
78(deftest simple-string.17
79  (typep* "abc" '(simple-string 2))
80  nil)
81
82(deftest simple-string.18
83  (typep* "abc" '(simple-string 4))
84  nil)
85
Note: See TracBrowser for help on using the repository browser.