1
0
mirror of synced 2026-05-03 22:59:35 +00:00
Files
Interlisp.medley/internal/test/LANGUAGE/AUTO/17-1-VECTOR.TEST

37 lines
928 B
Plaintext

;; Function To Be Tested: vector
;;
;; Source: Common Lisp by Guy Steele
;; Section 17.1: Array Creation Page: 290
;;
;; Created By: John Park
;;
;; Creation Date: June 5, 86
;;
;; Last Update: July 29, 1986, MASINTER, TYPE-OF IS NOT GUARANTEED TO RETURN 'ARRAY
;;
;; Filed as: {eris}<lispcore>cml>test>17-1-vector.test;;
;;
;; Syntax: vector &rest objects
;;
;; Function Description: Vector provides convenient means for creating
;; a simple general vector with specified initial contents
;;
;; Argument(s): any number of lisp objects
;;
;; Returns: array
;;
;; Constraints/limitations: None
(do-test vector-test
(and (TYPEP (setq v1 (vector 1 2 3)) 'array)
(TYPEP (setq a1 (make-array (list 3)
:element-type T
:initial-contents (list 1 2 3))) 'array)
(and (eq (aref v1 0)(aref a1 0))
(eq (aref v1 1)(aref a1 1))
(eq (aref v1 2)(aref a1 2)))))
STOP