Branch Coverage

lib/DR/Tnt/Msgpack.pm
Criterion Covered Total %
branch 112 162 69.1


line true false branch
16 43 31 if $utf8
27 0 122 unless defined $klen
31 0 122 unless defined $vlen
45 0 105 unless defined $elen
56 7 806 unless defined $str and length $str
61 583 223 if $tag <= 127
64 4 219 if $tag >= 224
67 67 152 if (($tag & 18446744073709551584) == 160)
69 0 67 unless length $str >= 1 + $len
70 4 63 unless $len
75 38 114 if (($tag & 18446744073709551600) == 128)
81 25 89 if (($tag & 18446744073709551600) == 144)
90 0 1 unless length $str >= 2
95 0 7 unless length $str >= 3
100 0 9 unless length $str >= 5
105 0 7 unless length $str >= 9
112 0 4 unless length $str >= 2
117 0 11 unless length $str >= 3
122 0 20 unless length $str >= 5
127 0 9 unless length $str >= 9
144 0 3 unless length $str >= 2
146 0 3 unless length $str >= 2 + $len
151 0 1 unless length $str >= 3
153 0 1 unless length $str >= 3 + $len
158 0 1 unless length $str >= 5
160 0 1 unless length $str >= 5 + $len
167 0 4 unless length $str >= 2
169 0 4 unless length $str >= 2 + $len
174 0 4 unless length $str >= 3
176 0 4 unless length $str >= 3 + $len
182 0 3 unless length $str >= 5
184 0 3 unless length $str >= 5 + $len
191 0 0 unless length $str >= 3
197 0 0 unless length $str >= 5
204 0 1 unless length $str >= 3
210 0 0 unless length $str >= 5
217 0 0 unless length $str >= 5
222 0 1 unless length $str >= 9
227 89 0 if exists $variant->{$tag}
241 0 263 unless defined $len
248 0 8 unless defined $len
270 96 131480 unless &Scalar::Util::looks_like_number($v)
275 1 131479 if $v == 9**9**9
276 0 131479 if $v == -9**9**9
278 131475 4 if ($v == int $v)
279 1 131474 unless $v <= $MAX_INT
288 123 131576 if (ref $v) { }
289 24 99 if ('ARRAY' eq ref $v) { }
28 71 elsif ('HASH' eq ref $v) { }
9 62 elsif ('SCALAR' eq ref $v) { }
62 0 elsif (&Scalar::Util::blessed($v)) { }
293 21 3 if ($size <= 15) { }
2 1 elsif ($size <= 65535) { }
309 26 2 if ($size <= 15) { }
2 0 elsif ($size <= 65535) { }
323 5 4 if $$v
326 50 12 if $v->can('TO_MSGPACK')
329 0 12 if ($v->can('TO_JSON'))
334 0 12 if ('JSON::XS::Boolean' eq ref $_)
335 0 0 if $_
338 0 12 if ('Types::Serialiser::Boolean' eq ref $_)
339 0 0 if $_
342 12 0 if ('JSON::PP::Boolean' eq ref $_)
343 6 6 if $_
348 0 0 if @l == 2
356 131478 98 if (&looks_like_number($v)) { }
357 131474 4 if ($v == int $v) { }
358 131442 32 if ($v >= 0)
359 131394 48 if ($v <= 127) { }
7 41 elsif ($v <= 255) { }
12 29 elsif ($v <= 65535) { }
17 12 elsif ($v <= 4294967295) { }
371 7 25 if ($v >= -32) { }
4 21 elsif ($v >= -128) { }
6 15 elsif ($v >= -32768) { }
8 7 elsif ($v >= -2147483648) { }
387 2 96 unless (defined $v)
390 10 86 if (utf8::is_utf8($v))
394 60 36 if (length $v <= 31) { }
14 22 elsif (length $v <= 255) { }
13 9 elsif (length $v <= 65535) { }