Superclass for the possible outcomes of running a test.
Outcome
is the result type of the withFixture
methods of traits
Suite
and FixtureSuite
, as well as their
NoArgTest
and OneArgTest
function types.
The four possible outcomes are:
-
Succeeded
- indicates a test succeeded -
Failed
- indicates a test failed and contains an exception describing the failure -
Canceled
- indicates a test was canceled and contains an exception describing the cancelation -
Pending
- indicates a test was pending
Note that "ignored" does not appear as a type of Outcome
, because tests are
marked as ignored on the outside and skipped over as the suite executes. So an ignored test never runs, and therefore
never has an outcome. By contrast, a test is determined to be pending by running the test
and observing the actual outcome. If the test body completes abruptly with a TestPendingException
,
then the outcome was that the test was pending.
- Companion:
- object
Value members
Abstract methods
Concrete methods
Inherited methods
Concrete fields
Indicates whether this Outcome
represents a test that was canceled.
Indicates whether this Outcome
represents a test that was canceled.
This class's implementation of this method always returns false
.
- Returns:
true if this
Outcome
is an instance ofCanceled
.
Indicates whether this Outcome
represents a test that either failed or was canceled, in which case this Outcome
will contain an exception.
Indicates whether this Outcome
represents a test that either failed or was canceled, in which case this Outcome
will contain an exception.
- Returns:
true if this
Outcome
is an instance of eitherFailed
orCanceled
.
Indicates whether this Outcome
represents a test that failed.
Indicates whether this Outcome
represents a test that failed.
This class's implementation of this method always returns false
.
- Returns:
true if this
Outcome
is an instance ofFailed
.
Indicates whether this Outcome
represents a test that was pending.
Indicates whether this Outcome
represents a test that was pending.
This class's implementation of this method always returns false
.
- Returns:
true if this
Outcome
is an instance ofPending
.