Branch Coverage

blib/lib/Test/DatabaseRow/Object.pm
Criterion Covered Total %
branch 101 106 95.2


line true false branch
74 91 333 $method ? :
98 38 5 if (ref $where eq 'ARRAY')
103 1 42 unless (ref $where eq 'HASH')
106 1 41 unless (ref $valuehash eq 'HASH')
123 5 11 if ref $sql_and_bind eq 'ARRAY'
124 10 1 if ref $sql_and_bind eq '' or blessed $sql_and_bind
130 1 40 unless ($self->has_table)
132 1 39 unless ($self->has_where)
145 2 39 if ($oper eq '=' and not defined $value)
151 1 38 unless (defined $value)
159 1 37 unless ($self->has_dbh)
181 1 46 unless ($self->dbh)
188 2 44 if ($self->force_utf8)
189 0 2 unless eval { do { require Encode; 1 } }
203 2 59 if ($self->force_utf8)
223 1 0 $self->has_db_results ? :
226 1 0 if ($builder->can('explain'))
251 25 7 if (ref $tests eq 'ARRAY')
254 1 24 if (@tests % 2 != 0)
267 1 43 unless (defined $value)
272 11 32 if (ref $value eq 'Regexp')
277 17 15 if ($value =~ /\A $RE{'num'}{'real'} \z/x)
288 1 30 unless (ref $tests eq 'HASH')
291 1 53 unless (ref $$tests{$valuekey} eq 'HASH')
333 3 39 if (not $self->has_min_results || $self->has_max_results || $self->has_results and $num_rows_from_db == 0)
341 1 38 if ($self->has_results and $num_rows_from_db != $self->results)
348 1 37 if ($self->has_min_results and $num_rows_from_db < $self->min_results)
355 1 36 if ($self->has_max_results and $num_rows_from_db > $self->max_results)
371 1 30 unless ($data)
375 1 29 unless $self->tests
385 2 42 unless (exists $$data{$colname})
386 1 1 if $self->has_table
406 1 41 unless eval "\$passed = \$got $oper \$expect; 1"
410 12 29 unless ($passed)
411 8 4 $oper =~ /\A (?:eq|==) \z/x ? :
426 13 23 unless $self->tests
429 12 14 if $result->is_error
430 7 7 unless $self->check_all_rows
438 6 36 if $result->is_error
453 8 11 $self->verbose ? :
1 18 $self->verbose_data ? :
484 2 6 if (@bind)
487 2 1 if (defined $bind) { }
507 4 0 defined $got ? :
508 4 0 defined $expect ? :
521 1 15 unless (defined ${$val;})
526 9 6 if ($type eq 'eq')
550 2 231 unless defined $_[0] and 0 + $_[0]
553 1 230 unless $n == int $n
555 4 224 if $n == 11 or $n == 12 or $n == 13
557 41 183 if $n == 1
558 22 161 if $n == 2
559 20 141 if $n == 3