Function: ADD-RESULT

Documentation

Create a TEST-RESULT object of type RESULT-TYPE passing it the initialize args MAKE-INSTANCE-ARGS and adds the resulting object to the list of test results.

Source

(defun add-result (result-type &rest make-instance-args)
  "Create a TEST-RESULT object of type RESULT-TYPE passing it the
  initialize args MAKE-INSTANCE-ARGS and adds the resulting
  object to the list of test results."
  (with-run-state (result-list current-test)
    (let ((result (apply #'make-instance result-type
                         (append make-instance-args (list :test-case current-test)))))
      (etypecase result
	(test-passed  (format *test-dribble* "."))
        (unexpected-test-failure (format *test-dribble* "X"))
	(test-failure (format *test-dribble* "f"))
	(test-skipped (format *test-dribble* "s")))
      (push result result-list))))
Source Context