Test::Stream::State - Representation of the state of the testing
See Test::Stream::Manual::ToTest2 for a conversion guide.
- $num = $state->count
Get the number of tests that have been run.
- $num = $state->failed
Get the number of failures (Not all failures come from a test fail, so this number can be larger than the count).
- $bool = $state->ended
True if the state has ended. This MAY return the stack frame of the tool that ended the test, but that is not guarenteed.
- $bool = $state->is_passing
Check if the overall state is a failure. Can also be used to set the pass/fail status.
Increase the test count by one,
$boolshould be true if the new test passed, false if it failed.
Increase the failure count, and set is_passing to false.
- $plan = $state->plan
Get or set the plan. The plan must be an integer larger than 0, the string 'no_plan', or the string 'skip_all'.
- $state->finish([$package, $file, $line])
This is used to finalize the state, no changes should be made to the state after this is set.
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.
Copyright 2015 Chad Granum <firstname.lastname@example.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.