Branch Coverage

blib/lib/Thrift/Parser/Type/Container.pm
Criterion Covered Total %
branch 72 94 76.6


line true false branch
39 2 34 if (not ref $self) { }
49 4 32 if (defined $$self{'value'})
54 2 34 unless (defined $val_type)
55 1 1 if ($class->idl)
62 7 27 if ($$self{'val_type_define'})
67 8 26 if ($class->can('key_type'))
69 0 8 unless (defined $key_type)
73 0 8 if ($$self{'key_type_define'})
78 6 28 if (blessed $value)
79 0 6 unless ($value->isa($class))
84 11 12 unless defined $$self{$key}
86 2 10 if ($key =~ /_define$/) { }
2 8 elsif ($value_a ne $value_b) { }
88 1 1 if (Dumper($value_a) ne Dumper($value_b))
100 8 20 if ($key_type) { }
101 1 7 if (not ref $value or ref $value ne 'HASH' and ref $value ne 'ARRAY')
104 5 2 ref $value eq 'HASH' ? :
105 1 6 if (int @args % 2 != 0)
117 1 19 if (not ref $value or ref $value ne 'ARRAY')
149 2 45 unless (defined $type)
152 1 44 if (ref $type)
155 43 1 if ($type =~ /^::/)
158 1 43 unless ($type->can('type_id'))
164 8 0 if ($type->can('val_type') and defined $args[0] and ref $args[0] and ref $args[0] eq 'ARRAY')
169 1 33 if (int @args)
179 0 1 if (blessed $value and $value->isa($class))
196 0 0 if ($type->isa('Thrift::IDL::Type::Custom') and $class->can('idl') and $class->idl->isa('Thrift::IDL::TypeDef'))
199 0 1 unless $type->can($key)
202 1 0 if ($idl_type->isa('Thrift::IDL::Type::Custom')) { }
0 0 elsif ($idl_type->can('val_type')) { }
204 1 0 defined $namespace ? :
225 0 1 unless ($self->can('key_type'))
243 1 1 $self->can('key_type') ? :
247 2 5 $is_map ? :
255 1 1 if ($self->can('key_type')) { }
259 0 2 if (not blessed $key) { }
0 2 elsif (not blessed $value) { }
297 0 3 $self->can('key_type') ? :
300 2 1 unless defined $idx
302 0 3 if ($idx > $#{$$self{'value'};})
304 0 0 $is_map ? :
308 0 3 $is_map ? :
333 0 7 unless defined $idx and not ref $idx and $idx =~ /^\d+$/
335 1 6 $self->can('key_type') ? :
336 0 1 $is_map ? :
1 6 if $idx > $#{$$self{'value'};}
337 1 5 $is_map ? :