File Coverage

blib/lib/Test2/EventFacet/Assert.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Test2::EventFacet::Assert;
2 246     246   1656 use strict;
  246         550  
  246         7254  
3 246     246   1239 use warnings;
  246         487  
  246         14038  
4              
5             our $VERSION = '1.302182';
6              
7 246     246   1984 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
  246         10631  
8 246     246   1628 use Test2::Util::HashBase qw{ -pass -no_debug -number };
  246         556  
  246         1715  
9              
10             1;
11              
12             __END__
13              
14             =pod
15              
16             =encoding UTF-8
17              
18             =head1 NAME
19              
20             Test2::EventFacet::Assert - Facet representing an assertion.
21              
22             =head1 DESCRIPTION
23              
24             The assertion facet is provided by any event representing an assertion that was
25             made.
26              
27             =head1 FIELDS
28              
29             =over 4
30              
31             =item $string = $assert->{details}
32              
33             =item $string = $assert->details()
34              
35             Human readable description of the assertion.
36              
37             =item $bool = $assert->{pass}
38              
39             =item $bool = $assert->pass()
40              
41             True if the assertion passed.
42              
43             =item $bool = $assert->{no_debug}
44              
45             =item $bool = $assert->no_debug()
46              
47             Set this to true if you have provided custom diagnostics and do not want the
48             defaults to be displayed.
49              
50             =item $int = $assert->{number}
51              
52             =item $int = $assert->number()
53              
54             (Optional) assertion number. This may be omitted or ignored. This is usually
55             only useful when parsing/processing TAP.
56              
57             B<Note>: This is not set by the Test2 system, assertion number is not known
58             until AFTER the assertion has been processed. This attribute is part of the
59             spec only for harnesses.
60              
61             =back
62              
63             =head1 SOURCE
64              
65             The source code repository for Test2 can be found at
66             F<http://github.com/Test-More/test-more/>.
67              
68             =head1 MAINTAINERS
69              
70             =over 4
71              
72             =item Chad Granum E<lt>exodist@cpan.orgE<gt>
73              
74             =back
75              
76             =head1 AUTHORS
77              
78             =over 4
79              
80             =item Chad Granum E<lt>exodist@cpan.orgE<gt>
81              
82             =back
83              
84             =head1 COPYRIGHT
85              
86             Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
87              
88             This program is free software; you can redistribute it and/or
89             modify it under the same terms as Perl itself.
90              
91             See F<http://dev.perl.org/licenses/>
92              
93             =cut