source: trunk/source/tests/ansi-tests/package-shadowing-symbols.lsp @ 8991

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: 2.0 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Feb 22 06:55:17 2004
4;;;; Contains: Tests of PACKAGE-SHADOWING-SYMBOLS
5
6(in-package :cl-test)
7
8;;; Most tests of this function are in files for other package-related operators
9
10;;; Specialized sequence tests
11
12(defmacro def-package-shadowing-symbols-test (test-name name-form)
13  `(deftest ,test-name
14     (let ((name ,name-form))
15       (safely-delete-package name)
16       (let ((p (make-package name :use nil)))
17          (package-shadowing-symbols p)))
18     nil))
19
20(def-package-shadowing-symbols-test package-shadowing-symbols.1
21  (make-array 5 :element-type 'base-char :initial-contents "TEST1"))
22
23(def-package-shadowing-symbols-test package-shadowing-symbols.2
24  (make-array 10 :element-type 'base-char
25              :fill-pointer 5
26              :initial-contents "TEST1?????"))
27
28(def-package-shadowing-symbols-test package-shadowing-symbols.3
29  (make-array 10 :element-type 'character
30              :fill-pointer 5
31              :initial-contents "TEST1?????"))
32
33(def-package-shadowing-symbols-test package-shadowing-symbols.4
34  (make-array 5 :element-type 'base-char :adjustable t
35              :initial-contents "TEST1"))
36
37(def-package-shadowing-symbols-test package-shadowing-symbols.5
38  (make-array 5 :element-type 'character :adjustable t
39              :initial-contents "TEST1"))
40
41(def-package-shadowing-symbols-test package-shadowing-symbols.6
42  (let* ((etype 'base-char)
43         (name0 (make-array 10 :element-type etype
44                            :initial-contents "XXTEST1XXX")))
45    (make-array 5 :element-type etype :displaced-to name0
46                :displaced-index-offset 2)))
47
48(def-package-shadowing-symbols-test package-shadowing-symbols.7
49  (let* ((etype 'character)
50         (name0 (make-array 10 :element-type etype
51                            :initial-contents "XXTEST1XXX")))
52    (make-array 5 :element-type etype :displaced-to name0
53                :displaced-index-offset 2)))
54
55;;; Error tests
56
57(deftest package-shadowing-symbols.error.1
58  (signals-error (package-shadowing-symbols) program-error)
59  t)
60
61(deftest package-shadowing-symbols.error.2
62  (signals-error (package-shadowing-symbols "CL" nil) program-error)
63  t)
64
Note: See TracBrowser for help on using the repository browser.