Branch Coverage

blib/lib/Web3/Tiny/ABI.pm
Criterion Covered Total %
branch 54 88 61.3


line true false branch
43 4 30 if $type eq "bytes" or $type eq "string"
44 4 26 if ($type =~ /^(.+)\[(\d*)\]$/)
46 4 0 if $size eq ""
54 0 13 if ($type =~ /^(.+)\[(\d+)\]$/)
66 0 8 if ref $n and $n->isa("Math::BigInt")
73 0 8 if $bi->is_neg
76 0 8 if length $hex > 64
89 0 0 if ($bi->is_neg)
100 0 0 if ($v->bcmp($two_255) >= 0)
109 0 2 unless defined $val
110 1 1 if ($val =~ /^0x([0-9a-fA-F]*)$/)
112 0 1 if length($hex) % 2
121 0 1 unless length $bytes == 20
133 0 1 unless length $bytes == $n
155 4 13 _is_dynamic_type($_) ? :
160 0 3 unless @$types == @$values
171 2 6 if (_is_dynamic_type($type)) { }
189 6 2 if ($hp->{'raw'}) { }
203 1 7 if ($type =~ /^(.+)\[(\d*)\]$/)
205 1 0 ref $value eq 'ARRAY' ? :
206 1 0 if ($size eq "")
210 0 0 unless scalar @vals == $size
215 1 6 if $type eq "bytes"
216 0 6 if $type eq "string"
217 1 5 if $type eq "address"
218 0 0 $value ? :
0 5 if $type eq "bool"
219 4 1 if $type =~ /^uint\d*$/
220 0 1 if $type =~ /^int\d*$/
221 1 0 if $type =~ /^bytes(\d+)$/
227 0 0 unless defined $str
228 0 0 unless utf8::is_utf8($str)
253 2 7 if (_is_dynamic_type($type))
267 0 7 if ($type =~ /^(.+)\[(\d+)\]$/)
273 1 1 $word eq "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" ? :
2 5 if $type eq "bool"
274 1 4 if $type eq "address"
275 3 1 if $type =~ /^uint\d*$/
276 0 1 if $type =~ /^int\d*$/
277 1 0 if $type =~ /^bytes(\d+)$/
286 1 1 if ($type =~ /^(.+)\[\]$/)
302 0 1 unless $sig =~ /^\s*(\w+)\s*\(\s*(.*?)\s*\)\s*$/
305 1 0 length $arglist ? :
319 0 1 unless scalar @$types == scalar @args