:documentation "The list of AND, OR, NOT forms specifying when to run this test.")
(status :initarg :status :accessor status :initform :unknown
:documentation "A symbol specifying the current status
- of this test. Either: T - this test (and all its
- dependencies, have passed. NIL - this test
- failed (either it failed or its dependecies weren't
- met. :circular this test has a circular dependency
- and was skipped. Or :depends-not-satisfied or :resolving")
+ of this test. Either: T - this test (and all its
+ dependencies, have passed. NIL - this test
+ failed (either it failed or its dependecies weren't
+ met. :circular this test has a circular dependency
+ and was skipped. Or :depends-not-satisfied or :resolving")
(profiling-info :accessor profiling-info
:initform nil
:documentation "An object representing how
information will be collected when the
test is run.")))
+(defgeneric testable-object-p (object)
+ (:method ((object testable-object)) t)
+ (:method ((object t)) nil))
+
(defmethod print-object ((test testable-object) stream)
(print-unreadable-object (test stream :type t :identity t)
(format stream "~S" (name test))))
(defclass test-suite (testable-object)
((tests :accessor tests :initform (make-hash-table :test 'eql)
:documentation "The hash table mapping names to test
- objects in this suite. The values in this hash table
- can be either test-cases or other test-suites."))
+ objects in this suite. The values in this hash table
+ can be either test-cases or other test-suites.")
+ (fixture :accessor fixture :initform nil :initarg :fixture
+ :documentation "FIXTURE to use, by default, for tests in
+ this suite."))
(:documentation "A test suite is a collection of tests or test suites.
Test suites serve to organize tests into groups so that the
((test-lambda :initarg :test-lambda :accessor test-lambda
:documentation "The function to run.")
(runtime-package :initarg :runtime-package :accessor runtime-package
- :documentation "By default it stores *package* from the time this test was defined (macroexpanded)."))
+ :documentation "By default it stores *package*
+ from the time this test was
+ defined (macroexpanded)."))
(:documentation "A test case is a single, named, collection of
checks.