Creates a new builder instance, and emits the corresponding plan line, unless the plan is not given.
Creates a new builder instance, and emits the corresponding plan line, unless the plan is not given.
plan for this test.
Whether this test is being run from a harness which
will not just be writing directly to the output.
This will make things written to Console.err
have
a newline prepended, so that they always start on
an empty line.
Abort the current test, with a message.
Create a new TestBuilder instance, to be used to run a subtest.
Create a new TestBuilder instance, to be used to run a subtest. This new
instance will have all of its lines prefixed by an additional level of
indentation. This instance will still need to have doneTesting
called on it, and the result of the subtest will still need to be
reported as a separate test result through ok
.
Writes a comment line to Console.err
.
Writes a comment line to Console.err
. This will allow it to be
visible in most summarizing harnesses (which consume and parse
everything that goes to Console.out
).
Finalize the current builder instance.
Finalize the current builder instance. This writes the auto-calculated
plan to Console.out
if the plan type was NoPlan
and reports a
summary of the test results as a comment to Console.err
.
whether or not the test class as a whole passed.
The exit code to use, in harnesses that run a single test.
The exit code to use, in harnesses that run a single test. Passing tests return 0, invalid tests (such as running a different number of tests than planned) return 255, and all others return the number of failed tests.
Write a comment line to Console.out
.
Write a comment line to Console.out
. This will typically only be
visible in the raw TAP stream.
Reports a single test result with description to Console.out
.
Reports a single test result to Console.out
.
Reports a single skipped test result to Console.out
.
Reports a single TODO test result with description to Console.out
.
Reports a single TODO test result to Console.out
.
This class provides a convenient yet low level API for generating TAP streams. Each instance of this class handles a single TAP stream, and keeps track of things like the current test number for you. All TAP-producing methods write the TAP lines to
Console.out
orConsole.err
, so you can override those (viaConsole.withOut
orConsole.withErr
).