Test::TAP::Model::Subtest - An object for querying a test case
my @cases = $f->cases; $case[0]->ok; # or whatever
This object allows you to ask questions about a test case in a test file's output.
This constructor accepts the hash reference to the event logged for this subtest.
It doesn't bless the hash itself, but rather a reference to it, so that other objects' feet aren't stepped on.
Whether the test is logically OK - if it's TODO and not OK this returns true.
This is the real value from the output. not OK and todo is false here.
The opposite of ok
ok
The opposite of actual_ok
actual_ok
Whether the test was skipped
Whether the test was todo
Whether the result is consistent, that is OK xor TODO. An abnormal result should be noted.
The negation of normal
normal
Whether this test is within the plan declared by the file.
Maybe it's in love with another fish.
The number of the test (useful for when the test came from a filtered query).
The raw line the data was parsed from.
Diagnosis immediately following the test line.
If there was a reason (for skip or todo), it's here.
These methods extract the little <pos:file.t at line 5, column 3> comments as outputted by pugs' Test.pm.
<pos:file.t at line 5, column 3>
Supposedly this is where the test case that fail was written.
A stringy representation much like Test::Harness prints in it's output:
(?:not )?ok $num/$planned
To install Test::TAP::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::TAP::Model
CPAN shell
perl -MCPAN -e shell install Test::TAP::Model
For more information on module installation, please visit the detailed CPAN module installation guide.