3 ;;; ---------------------------------------------------------------------------
4 ;;; randomized testing helpers
5 ;;; ---------------------------------------------------------------------------
7 (u:export-exported-symbols
"VARIATES" "LIFT")
9 ;;; ---------------------------------------------------------------------------
11 (defclass randomized-testsuite-mixin
(test-mixin)
16 :initarg
:shuffle-methods?
17 :reader shuffle-methods?
)))
19 ;;; ---------------------------------------------------------------------------
21 (defmethod testsuite-methods :around
((case randomized-testsuite-mixin
))
22 (let ((methods (call-next-method)))
23 (if (shuffle-methods? case
)
24 (variates:shuffle-elements
! (copy-list methods
) :generator
(generator case
))
27 ;;; ---------------------------------------------------------------------------
28 ;;; single-setup testing
29 ;;; ---------------------------------------------------------------------------
31 (defclass single-setup-mixin
(test-mixin)
34 :initargs
:single-setup?
35 :reader single-setup?
)))
37 ;;; ---------------------------------------------------------------------------
39 (defmethod initialize-instance :after
((object single-setup-mixin
) &key
)
40 ;; no shuffling of single setup tests
41 (when (slot-exists-p object
'shuffle-methods?
)
42 (setf (slot-value object
'shuffle-methods?
) nil
)))