Commit 7c96dd9c authored by pfdietz's avatar pfdietz
Browse files

Add base-string, simple-base-string, sequence types to make-random-type-containing

parent 57c0c407
......@@ -366,14 +366,22 @@
(1 `(,root ,etype ,(loop for i below rank collect (make-random-array-dimension-spec val i))))
(1 `(,root ,etype ,(loop for i below rank collect (array-dimension val i))))
#-ecl (1 `(,root ,etype ,rank))
(4 (call-next-method))
(defmethod make-random-type-containing ((val string))
(1 (let ((root (if (and (coin)
(typep val 'simple-string))
(1 (let ((root (cond
((and (coin)
(typep val 'base-string))
((and (coin) (typep val 'simple-base-string))
(t 'base-string)))
((and (coin)
(typep val 'simple-string))
(t 'string))))
(rcase (1 root)
(1 `(,root))
(3 `(,root ,(make-random-array-dimension-spec val 0))))))
......@@ -426,6 +434,11 @@
(1 t)))
(defmethod make-random-type-containing ((val sequence))
(1 'sequence)
(2 (call-next-method))))
;;; Macro for defining random type prop tests
(defmacro def-type-prop-test (name &body args)
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