source: trunk/source/tests/ansi-tests/array-element-type.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: 869 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Contains: Tests of the function ARRAY-ELEMENT-TYPE
4
5(in-package :cl-test)
6
7;;; Mosts tests are in other files, incidental to testing of
8;;; other things
9
10(deftest array-element-type.1
11  (macrolet ((%m (z) z))
12            (notnot (array-element-type (expand-in-current-env (%m #(a b c))))))
13  t)
14
15(deftest array-element-type.order.1
16  (let ((i 0))
17    (array-element-type (progn (incf i) #(a b c)))
18    i)
19  1)
20
21;;; Error tests
22
23(deftest array-element-type.error.1
24  (signals-error (array-element-type) program-error)
25  t)
26
27(deftest array-element-type.error.2
28  (signals-error (array-element-type #(a b c) nil) program-error)
29  t)
30
31(deftest array-element-type.error.3
32  (check-type-error #'array-element-type #'arrayp)
33  nil)
34
35(deftest array-element-type.error.4
36  (signals-type-error x nil (array-element-type x))
37  t)
38
39
Note: See TracBrowser for help on using the repository browser.