366 |
(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 (make-random-array-dimension-spec val i)))) |
367 |
(1 `(,root ,etype ,(loop for i below rank collect (array-dimension val i)))) |
(1 `(,root ,etype ,(loop for i below rank collect (array-dimension val i)))) |
368 |
#-ecl (1 `(,root ,etype ,rank)) |
#-ecl (1 `(,root ,etype ,rank)) |
369 |
|
(4 (call-next-method)) |
370 |
))) |
))) |
371 |
|
|
372 |
(defmethod make-random-type-containing ((val string)) |
(defmethod make-random-type-containing ((val string)) |
373 |
(rcase |
(rcase |
374 |
(1 (let ((root (if (and (coin) |
(1 (let ((root (cond |
375 |
(typep val 'simple-string)) |
((and (coin) |
376 |
'simple-string |
(typep val 'base-string)) |
377 |
'string))) |
(cond |
378 |
|
((and (coin) (typep val 'simple-base-string)) |
379 |
|
'simple-base-string) |
380 |
|
(t 'base-string))) |
381 |
|
((and (coin) |
382 |
|
(typep val 'simple-string)) |
383 |
|
'simple-string) |
384 |
|
(t 'string)))) |
385 |
(rcase (1 root) |
(rcase (1 root) |
386 |
(1 `(,root)) |
(1 `(,root)) |
387 |
(3 `(,root ,(make-random-array-dimension-spec val 0)))))) |
(3 `(,root ,(make-random-array-dimension-spec val 0)))))) |
434 |
'function)) |
'function)) |
435 |
(1 t))) |
(1 t))) |
436 |
|
|
437 |
|
(defmethod make-random-type-containing ((val sequence)) |
438 |
|
(rcase |
439 |
|
(1 'sequence) |
440 |
|
(2 (call-next-method)))) |
441 |
|
|
442 |
;;; Macro for defining random type prop tests |
;;; Macro for defining random type prop tests |
443 |
|
|
444 |
(defmacro def-type-prop-test (name &body args) |
(defmacro def-type-prop-test (name &body args) |