Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ansi-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karsten Poeck
ansi-test
Commits
675a3380
Commit
675a3380
authored
Jan 25, 2003
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More array type tests.
parent
b29d1279
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
276 additions
and
0 deletions
+276
-0
ansi-tests/array-t.lsp
ansi-tests/array-t.lsp
+275
-0
ansi-tests/gclload2.lsp
ansi-tests/gclload2.lsp
+1
-0
No files found.
ansi-tests/array-t.lsp
0 → 100644
View file @
675a3380
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Jan 25 11:55:48 2003
;;;; Contains: Tests of (array t ...) type specifiers
(in-package :cl-test)
;;; Tests of (array t)
(deftest array-t.2.1
(notnot-mv (typep #() '(array t)))
t)
(deftest array-t.2.2
(notnot-mv (typep #0aX '(array t)))
t)
(deftest array-t.2.3
(notnot-mv (typep #2a(()) '(array t)))
t)
(deftest array-t.2.4
(notnot-mv (typep #(1 2 3) '(array t)))
t)
(deftest array-t.2.5
(typep "abcd" '(array t))
nil)
(deftest array-t.2.6
(typep #*010101 '(array t))
nil)
;;; Tests of (array t ())
(deftest array-t.3.1
(notnot-mv (typep #() '(array t nil)))
nil)
(deftest array-t.3.2
(notnot-mv (typep #0aX '(array t nil)))
t)
(deftest array-t.3.3
(typep #2a(()) '(array t nil))
nil)
(deftest array-t.3.4
(typep #(1 2 3) '(array t nil))
nil)
(deftest array-t.3.5
(typep "abcd" '(array t nil))
nil)
(deftest array-t.3.6
(typep #*010101 '(array t nil))
nil)
;;; Tests of (array t 1)
;;; The '1' indicates rank, so this is equivalent to 'vector'
(deftest array-t.4.1
(notnot-mv (typep #() '(array t 1)))
t)
(deftest array-t.4.2
(typep #0aX '(array t 1))
nil)
(deftest array-t.4.3
(typep #2a(()) '(array t 1))
nil)
(deftest array-t.4.4
(notnot-mv (typep #(1 2 3) '(array t 1)))
t)
(deftest array-t.4.5
(typep "abcd" '(array t 1))
nil)
(deftest array-t.4.6
(typep #*010101 '(array t 1))
nil)
;;; Tests of (array t 0)
(deftest array-t.5.1
(typep #() '(array t 0))
nil)
(deftest array-t.5.2
(notnot-mv (typep #0aX '(array t 0)))
t)
(deftest array-t.5.3
(typep #2a(()) '(array t 0))
nil)
(deftest array-t.5.4
(typep #(1 2 3) '(array t 0))
nil)
(deftest array-t.5.5
(typep "abcd" '(array t 0))
nil)
(deftest array-t.5.6
(typep #*010101 '(array t 0))
nil)
;;; Tests of (array t *)
(deftest array-t.6.1
(notnot-mv (typep #() '(array t *)))
t)
(deftest array-t.6.2
(notnot-mv (typep #0aX '(array t *)))
t)
(deftest array-t.6.3
(notnot-mv (typep #2a(()) '(array t *)))
t)
(deftest array-t.6.4
(notnot-mv (typep #(1 2 3) '(array t *)))
t)
(deftest array-t.6.5
(typep "abcd" '(array t *))
nil)
(deftest array-t.6.6
(typep #*010101 '(array t *))
nil)
;;; Tests of (array t 2)
(deftest array-t.7.1
(typep #() '(array t 2))
nil)
(deftest array-t.7.2
(typep #0aX '(array t 2))
nil)
(deftest array-t.7.3
(notnot-mv (typep #2a(()) '(array t 2)))
t)
(deftest array-t.7.4
(typep #(1 2 3) '(array t 2))
nil)
(deftest array-t.7.5
(typep "abcd" '(array t 2))
nil)
(deftest array-t.7.6
(typep #*010101 '(array t 2))
nil)
;;; Testing '(array t (--))
(deftest array-t.8.1
(typep #() '(array t (1)))
nil)
(deftest array-t.8.2
(notnot-mv (typep #() '(array t (0))))
t)
(deftest array-t.8.3
(notnot-mv (typep #() '(array t (*))))
t)
(deftest array-t.8.4
(typep #(a b c) '(array t (2)))
nil)
(deftest array-t.8.5
(notnot-mv (typep #(a b c) '(array t (3))))
t)
(deftest array-t.8.6
(notnot-mv (typep #(a b c) '(array t (*))))
t)
(deftest array-t.8.7
(typep #(a b c) '(array t (4)))
nil)
(deftest array-t.8.8
(typep #2a((a b c)) '(array t (*)))
nil)
(deftest array-t.8.9
(typep #2a((a b c)) '(array t (3)))
nil)
(deftest array-t.8.10
(typep #2a((a b c)) '(array t (1)))
nil)
(deftest array-t.8.11
(typep "abc" '(array t (2)))
nil)
(deftest array-t.8.12
(typep "abc" '(array t (3)))
nil)
(deftest array-t.8.13
(typep "abc" '(array t (*)))
nil)
(deftest array-t.8.14
(typep "abc" '(array t (4)))
nil)
;;; Two dimensional array type tests
(deftest array-t.9.1
(typep #() '(array t (* *)))
nil)
(deftest array-t.9.2
(typep "abc" '(array t (* *)))
nil)
(deftest array-t.9.3
(typep #(a b c) '(array t (3 *)))
nil)
(deftest array-t.9.4
(typep #(a b c) '(array t (* 3)))
nil)
(deftest array-t.9.5
(typep "abc" '(array t (3 *)))
nil)
(deftest array-t.9.6
(typep "abc" '(array t (* 3)))
nil)
(deftest array-t.9.7
(notnot-mv (typep #2a((a b)(c d)(e f)) '(array t (* *))))
t)
(deftest array-t.9.8
(notnot-mv (typep #2a((a b)(c d)(e f)) '(array t (3 *))))
t)
(deftest array-t.9.9
(typep #2a((a b)(c d)(e f)) '(array t (2 *)))
nil)
(deftest array-t.9.10
(notnot-mv (typep #2a((a b)(c d)(e f)) '(array t (* 2))))
t)
(deftest array-t.9.11
(typep #2a((a b)(c d)(e f)) '(array t (* 3)))
nil)
(deftest array-t.9.12
(notnot-mv (typep #2a((a b)(c d)(e f)) '(array t (3 2))))
t)
(deftest array-t.9.13
(typep #2a((a b)(c d)(e f)) '(array t (2 3)))
nil)
ansi-tests/gclload2.lsp
View file @
675a3380
...
...
@@ -135,6 +135,7 @@
;;; Tests on arrays
(compile-and-load "array-aux.lsp")
(load "array.lsp")
(load "array-t.lsp")
(load "make-array.lsp")
(load "adjustable-array-p.lsp")
(load "array-displacement.lsp")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment