Commit c0b3b35d authored by Raymond Toy's avatar Raymond Toy
Browse files

Merge branch 'defstruct-new' into 'master'

Defstruct tests for predicate, type and named combinations

See merge request !7
parents 87c8f24a 66fcf657
......@@ -485,6 +485,15 @@
(defstruct-with-tests (struct-test-68 (:include struct-test-67))
c d)
;;; Structure isn't named, but type is specified. No predicate is
;;; allowed *or* predicate must be NIL.
(defstruct-with-tests (struct-test-69 (:type (vector single-float))
(:predicate nil)))
(defstruct-with-tests (struct-test-70 (:type list)
(:predicate struct-test-70)
;;; Error tests
(deftest copy-structure.error.1
......@@ -495,3 +504,21 @@
(signals-error (copy-structure (make-s-2) nil) program-error)
(deftest defstruct.error.3
(eval (read-from-string
"(defstruct (struct-test.error.3 (:type (vector single-float))
(:predicate struct-test.error.3)))"))
;;; If named option is supplied, then 0th element is vector type (a
;;; symbol), not the 1st one.
(deftest defstruct.error.4
(eval (read-from-string
"(defstruct (struct-test.error.4 (:type (vector single-float))
(:predicate struct-test.error.4)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment