Branch Coverage

blib/lib/CSS/DOM/Value/Primitive.pm
Criterion Covered Total %
branch 98 124 79.0


line true false branch
19 31 0 if $_[1] eq 'CSS::DOM::Value'
20 0 0 if defined &UNIVERSAL::DOES
44 0 500 unless exists $args{$_}
73 280 102 if (defined wantarray)
74 182 98 if (defined $self->[4]) { }
90 2 1 $val =~ /^#/ ? :
6 3 ref $val eq 'ARRAY' ? :
9 87 $_ == 25 ? :
2 96 $_ == 24 ? :
93 3 1 if (my $form = $self->[9] and @$val < 4 || $val->[3]->getFloatValue == 1)
98 2 1 if ($form =~ /^#/) { }
102 0 2 if ($digits == 1)
105 0 0 if ($val_obj->primitiveType == 1) { }
109 0 0 unless not $val % 17 and $val == int $val and $val > 0 and $val < 256
117 0 0 unless not $val % 20 and $val == int $val and $val > 0 and $val < 101
126 2 0 if (not $val or $digits == 2)
129 3 1 if ($val_obj->primitiveType == 1) { }
1 0 elsif ($digits == 2) { }
133 0 3 unless $val == int $val and $val > 0 and $val < 256
139 0 0 unless not $val % 20 and $val == int $val and $val > 0 and $val < 101
148 1 1 if $ret
152 1 0 if $val_objs[0]->getFloatValue == $rgb->[0] and $val_objs[1]->getFloatValue == $rgb->[1] and $val_objs[2]->getFloatValue == $rgb->[2]
162 4 2 unless ($ret)
165 2 2 if ($types[0] == $types[1] and $types[0] == $types[2]) { }
171 0 2 $types[0] == $types[1] || $types[0] == $types[2] ? :
177 4 2 $types[$_] == 1 ? :
0 0 $types[$_] == 2 ? :
2 0 $type == 1 ? :
192 2 2 @$val >= 4 && ($alpha = $self->alpha->cssText) != 1 ? :
205 104 278 if (@_)
207 4 100 unless my $owner = $self->[5]
214 10 90 if (my $format = $self->[8]) { }
0 90 elsif (not defined $prop) { }
9 81 elsif (defined(my $index = $self->[7])) { }
39 42 elsif (my(@arsg) = $owner->property_parser->match($prop, $_[0])) { }
215 1 9 unless (our $parser)
222 5 5 if (my(@args) = do { our $parser }->match('_', shift()))
273 0 9 if ($list->length != $length)
293 16 84 if (my $mh = $owner->modification_handler)
314 2 2 defined $val->[1] ? :
2 2 defined $val->[2] ? :
94 10 $unit_suffixes[$_] ? :
42 104 $_ == 1 ? :
1 146 $_ == 18 ? :
4 147 $_ == 23 ? :
10 151 $_ == 19 ? :
0 161 $_ == 25 ? :
0 161 $_ == 24 ? :
7 161 $_ == 20 ? :
5 168 $_ == 22 ? :
347 4 86 if $type == 0 or $type == 23 or $type == 24 or $type == 25 or $type == 18
356 42 42 if $self->cssText ne $css
368 5 33 if $type == 0 or $type == 19 or $type == 20 or $type == 21 or $type == 22 or $type == 23 or $type == 24 or $type == 25
374 1 32 $type == 18 ? :
384 25 2 unless $type == 19 or $type == 20 or $type == 21 or $type == 22
396 12 1 if (ref $val eq 'ARRAY')
417 4 46 if (ref $self->[3] ne 'ARRAY')
418 3 1 if ($self->[3] =~ /^#(..|.)(..|.)(..|.)/) { }
427 1 0 unless our %Colours
437 33 17 if (ref $val eq 'ARRAY') { }
6 22 elsif (not defined $val and $index == 3) { }
438 3 30 $index == 3 ? :