line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Unit::Assertion; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
2
|
|
|
2
|
|
40
|
$Test::Unit::Assertion::VERSION = '0.25_1325'; # added by dist-tools/SetVersion.pl |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
52
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
10
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
107
|
|
9
|
2
|
|
|
2
|
|
11
|
use Test::Unit::Failure; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
27
|
|
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
96
|
use overload '""' => 'to_string'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub fail { |
14
|
16
|
|
|
16
|
0
|
26
|
my $self = shift; |
15
|
16
|
|
|
|
|
81
|
my($asserter, $file, $line) = caller(2); # We're always called from |
16
|
|
|
|
|
|
|
# within an Assertion... |
17
|
16
|
|
|
|
|
123
|
Test::Unit::Failure->throw(-object => $self, |
18
|
|
|
|
|
|
|
-file => $file, |
19
|
|
|
|
|
|
|
-line => $line, |
20
|
|
|
|
|
|
|
-text => join '', @_); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub do_assertion { |
24
|
0
|
|
|
0
|
1
|
|
Carp::croak("$_[0] forgot to override do_assertion"); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
28
|
0
|
|
|
0
|
1
|
|
Carp::croak("$_[0] forgot to override new"); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |