Branch Coverage

blib/lib/SDLx/Surface.pm
Criterion Covered Total %
branch 40 82 48.7


line true false branch
46 32 8 if ($options{'surface'}) { }
51 8 0 if ($width and $height) { }
70 1 39 if (exists $options{'color'})
78 1 0 if $disp
83 0 0 if ($width and $height) { }
115 5 74 if ($array)
116 5 0 if $array
139 5 69 unless ($array)
158 0 0 if $_[1] and $_[1]->isa('SDL::Rect')
168 11 0 if ($type and lc $type eq 'bmp' or lc substr($filename, -4, 4) eq '.bmp') { }
171 0 11 unless $surface = SDL::Video::load_BMP($filename)
178 0 0 unless 'SDL::Config'->has('SDL_image')
183 0 0 if ($type) { }
185 0 0 unless my $file = 'SDL::RWOps'->new_file($filename, 'rb')
187 0 0 unless $surface = SDL::Image::load_typed_rw($file, 1, $type)
190 0 0 unless $surface = SDL::Image::load($filename)
196 11 0 if (SDL::Video::get_video_surface())
212 0 1 unless $_[0]
213 0 1 if SDL::Video::flip($_[0]) == -1
222 2 1 if (not defined $rects or ref $rects eq 'ARRAY' and not ref $rects->[0]) { }
224 1 1 if $rects
241 0 6 unless ref $start eq 'ARRAY'
243 0 6 unless ref $end eq 'ARRAY'
246 0 6 unless ('SDL::Config'->has('SDL_gfx_primitives'))
254 2 4 if ($antialias) { }
260 0 6 if $result == -1
268 0 9 unless ('SDL::Config'->has('SDL_gfx_primitives'))
273 0 9 unless ref $center eq 'ARRAY' and scalar @$center == 2
276 4 5 if ($antialias) { }
290 0 4 unless ('SDL::Config'->has('SDL_gfx_primitives'))
295 0 4 unless ref $center eq 'ARRAY' and scalar @$center == 2
308 4 5 if ($antialias) { }
344 0 0 unless ref $center eq 'ARRAY' and scalar @$center == 2
355 0 0 unless ref $center eq 'ARRAY' and scalar @$center == 2
358 0 0 if ($antialias) { }
373 0 0 unless ref $center eq 'ARRAY' and scalar @$center == 2
396 0 3 unless ('SDL::Config'->has('SDL_gfx_primitives'))
401 1 2 if ($font)
402 1 0 if (ref $font eq 'HASH' and exists $font->{'data'} and exists $font->{'cw'} and exists $font->{'ch'}) { }
409 0 3 unless ref $vector eq 'ARRAY' and scalar @$vector == 2
416 0 3 if $result == -1