1Test::Stream::State(3)User Contributed Perl DocumentationTest::Stream::State(3)
2
3
4
6 Test::Stream::State - Representation of the state of the testing
7
9 This distribution is deprecated in favor of Test2, Test2::Suite, and
10 Test2::Workflow.
11
12 See Test::Stream::Manual::ToTest2 for a conversion guide.
13
15 $num = $state->count
16 Get the number of tests that have been run.
17
18 $num = $state->failed
19 Get the number of failures (Not all failures come from a test fail,
20 so this number can be larger than the count).
21
22 $bool = $state->ended
23 True if the state has ended. This MAY return the stack frame of the
24 tool that ended the test, but that is not guarenteed.
25
26 $bool = $state->is_passing
27 $state->is_passing($bool)
28 Check if the overall state is a failure. Can also be used to set
29 the pass/fail status.
30
31 $state->bump($bool)
32 Increase the test count by one, $bool should be true if the new
33 test passed, false if it failed.
34
35 $state->bump_fail
36 Increase the failure count, and set is_passing to false.
37
38 $state->plan($plan)
39 $plan = $state->plan
40 Get or set the plan. The plan must be an integer larger than 0, the
41 string 'no_plan', or the string 'skip_all'.
42
43 $state->finish([$package, $file, $line])
44 This is used to finalize the state, no changes should be made to
45 the state after this is set.
46
48 The source code repository for Test::Stream can be found at
49 http://github.com/Test-More/Test-Stream/.
50
52 Chad Granum <exodist@cpan.org>
53
55 Chad Granum <exodist@cpan.org>
56 Kent Fredric <kentnl@cpan.org>
57
59 Copyright 2015 Chad Granum <exodist7@gmail.com>.
60
61 This program is free software; you can redistribute it and/or modify it
62 under the same terms as Perl itself.
63
64 See http://dev.perl.org/licenses/
65
66
67
68perl v5.32.0 2020-07-28 Test::Stream::State(3)