(defun explain! (result-list)
"Explain the results of RESULT-LIST using a
-detailed-text-explainer with output going to *test-dribble*"
- (explain (make-instance 'detailed-text-explainer) result-list *test-dribble*))
+detailed-text-explainer with output going to *test-dribble*.
+Return a boolean indicating whether no tests failed."
+ (explain (make-instance 'detailed-text-explainer) result-list *test-dribble*)
+ (notany #'test-failure-p result-list))
(defun debug! (&optional (test-spec *suite*))
"Calls (run! test-spec) but enters the debugger if any kind of error happens."
(for-all (((a b) (dummy-mv-generator)))
(is (= 1 a))
(is (= 1 b))))
+
+(def-test return-values ()
+ "Return values indicate test failures."
+ (is-true (with-*test-dribble* nil (explain! (run 'is1))))
+ (is-true (with-*test-dribble* nil (run! 'is1)))
+
+ (is-false (with-*test-dribble* nil (explain! (run 'is2))))
+ (is-false (with-*test-dribble* nil (run! 'is2))))