Branch Coverage

blib/lib/Color/Model/RGB.pm
Criterion Covered Total %
branch 48 80 60.0


line true false branch
139 5 0 if (not ref $_[0]) { }
140 0 5 if (@_ == 1)
147 0 15 $_ > 1 ? :
0 15 $_ < -1 ? :
157 0 12 if @_ == 4
158 3 33 $_ > 255 ? :
0 36 $_ < -255 ? :
169 1 0 if (defined $h and $h =~ /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/) { }
236 33 3 if (not @_) { }
3 0 elsif (@_ == 1) { }
272 5 181 if $$c[0][0][$_] < 0
273 1 185 if $$c[0][0][$_] > 1
283 0 0 if $$v[0][0][$_] < -1
284 0 0 if $$v[0][0][$_] > 1
293 16 29 unless defined $fmt
294 16 29 unless defined $hexed
295 43 2 if ($hexed) { }
451 0 10 if (ref $argument) { }
10 0 elsif (defined $argument) { }
452 0 0 if ($argument->isa('Math::MatrixReal')) { }
455 0 0 if (not $flip) { }
473 4 6 if defined $$v[6]
484 3 0 if (defined $argument and not ref $argument and $argument >= 0)
488 3 6 if $Color::Model::RGB::BIT_SHIFT_RIGID
502 1 0 if (defined $argument and not ref $argument and $argument >= 0)
517 1 1 if (ref $argument) { }
1 0 elsif (defined $argument) { }
545 1 1 if (ref $argument) { }
1 0 elsif (defined $argument) { }
574 1 1 if (ref $argument) { }
1 0 elsif (defined $argument) { }
652 0 4 unless (@_)
655 4 0 if (@_ == 2)
656 4 0 $hexed ? :
658 4 0 if (@_ >= 1)
659 4 0 if defined $fmt
691 0 4 unless (&Scalar::Util::blessed($src) and $src->isa('Color::Model::RGB'))
694 0 4 unless (not ref $src_rate and $src_rate =~ /^[0-9\.\-]+$/ and $src_rate >= -1 and $src_rate <= 1)
698 0 4 unless (&Scalar::Util::blessed($dist) and $dist->isa('Color::Model::RGB'))
701 0 4 unless (not ref $dist_rate and $dist_rate =~ /^[0-9\.\-]+$/ and $dist_rate >= -1 and $dist_rate <= 1)