Branch Coverage

blib/lib/Data/Generate.pm
Criterion Covered Total %
branch 121 148 81.7


line true false branch
699 0 4 unless defined $parser
711 11 1 unless exists $self->{'actual_vcol'}{'reverse_flag'}
724 0 16 if ($min > $max)
742 0 5 unless open VCOLFILE, $file
745 0 5 if $#cmp == -1
747 3 0 if (exists $$Data::Generate::vchain_type{$self->{'chain_type'}} and exists $$Data::Generate::vchain_type{$self->{'chain_type'}}{'check_type'})
757 15 4 if defined $result
782 16 8 if ($self->{'actual_vcol'}{'type'} =~ /^(month|year)$/)
789 0 8 if $self->{'actual_vcol'}{'type'} ne "day"
794 2 6 if (exists $self->{'day_vcol'}{'weekday_term_list'})
817 11 13 if $day_term < 1
828 200 0 if defined str2time($date_term)
867 8 6 if $_[0] < $fraction_start
951 0 8 if (@$vchain_exp_list == 0)
986 2 2 if ($#{$$vchain_merged{"vcol_hash"}{1}{"value_column"};} == 0 and $vchain_merged->{'vcol_hash'}{'1'}{'value_column'}[0] == 0 and $#{$$vchain_merged{"vcol_hash"}{2}{"value_column"};} == 0 and $vchain_merged->{'vcol_hash'}{'2'}{'value_column'}[0] eq "." and $#{$$vchain_merged{"vcol_hash"}{3}{"value_column"};} == 0 and $vchain_merged->{'vcol_hash'}{'3'}{'value_column'}[0] == 0 and $vchain_merged->{'vcol_count'} == 3)
995 0 2 if defined $vchain_zero
1032 1 25 if ($self->{'actual_vchain'}{'chain_subtype'} eq "FLOATLIST")
1039 8 17 if ($self->{'actual_vchain'}{'chain_subtype'} eq "FLOATINTPART")
1045 5 3 if not exists $self->{'actual_vchain'}{'sign'} or exists $self->{'actual_vchain'}{'sign'}{'+'}
1048 5 3 if exists $self->{'actual_vchain'}{'sign'} and exists $self->{'actual_vchain'}{'sign'}{'-'}
1059 8 9 if ($self->{'actual_vchain'}{'chain_subtype'} eq "FLOATFRACTION")
1066 1 8 if ($self->{'actual_vchain'}{'chain_subtype'} eq "FLOATEXP")
1077 0 8 unless $self->{'actual_vchain'}{'chain_subtype'} eq "FLOATTOTAL"
1081 7 1 unless (exists $self->{'FLOAT_EXP_PART'})
1137 11 2 if not exists $last_vchain->{'sign'} or exists $last_vchain->{'sign'}{'+'}
1139 3 0 if exists $last_vchain->{'sign'} and exists $last_vchain->{'sign'}{'-'}
1147 9 4 if $vchain->{'vcol_count'} == 0 and @{$vchain->{'vcol_hash'}{'0'}{'value_column'};} == 1 and $vchain->{'vcol_hash'}{'0'}{'value_column'}[0] == 0
1196 73 31 unless $vcol_value =~ /^0+$/
1197 31 73 if $vcol_value =~ /^0+$/
1199 36 10 if (@$vcol_nonzero_list > 0)
1207 15 31 unless @$vcol_zero_list > 0
1214 31 20 if $_[0] == 0
1220 16 15 if (@$vcol_zero_list > 0)
1256 39 165 unless defined $new_index
1274 0 101 unless defined $type
1275 16 85 unless exists $Data::Generate::vcol_type->{$type}
1278 85 0 if (exists $limit_check_hash->{'lowlimit'} and defined $limit_check_hash->{'lowlimit'})
1283 0 85 if $value < $limit_check_hash->{'lowlimit'}
1285 85 0 if (exists $limit_check_hash->{'highlimit'} and defined $limit_check_hash->{'highlimit'})
1290 0 85 if $value > $limit_check_hash->{'highlimit'}
1306 0 2 if ($min > $max)
1398 21 102 if exists $self->{'actual_vcol'}{'quantifier'}
1401 24 99 if (defined $self->{'actual_vcol'}{'type'} and $self->{'actual_vcol'}{'type'} =~ /^(day|month|year)$/) { }
0 99 elsif (defined $self->{'actual_vcol'}{'type'} and $self->{'actual_vcol'}{'type'} eq 'sign') { }
1452 5 49 if ($self->{'chain_type'} eq "INTEGER")
1457 2 47 if (exists $self->{'actual_vchain'}{'chain_subtype'} and $self->{'actual_vchain'}{'chain_subtype'} eq "DATEWITHFRACTION")
1463 26 21 if ($self->{'chain_type'} eq "FLOAT")
1489 1 786 if (exists $self->{'ct_length'} and defined $self->{'ct_length'} and $self->{'actual_vchain'}{'vchain_length'} + $vterm_length > $self->{'ct_length'}) { }
2 784 elsif ($unique->{$value_term}++ > 0) { }
1508 148 636 $vterm_length > $vcol_maxlength ? :
1513 1 135 if ($#{$value_column;} == -1)
1518 82 53 if (exists $self->{'actual_vchain'}{'vcol_count'}) { }
1545 181 75 unless $hash->{$_}
1592 271 297 if ($vchain_occupation_ratio == 1) { }
1618 0 66 unless defined $vchain_ref->{'weigth'} and defined $vchain_ref->{'vchain_card'}
1619 66 0 if ($vchain_ref->{'weigth'} > 0.0001) { }
1628 0 66 if $vchain_ref->{'weigthed_card'} < 1
1630 29 37 unless defined $weigthed_card
1632 4 62 if $weigthed_card > $vchain_ref->{'weigthed_card'}
1636 1 28 if (int($weigthed_card) + 1 - $weigthed_card < "1e-09")
1714 2 52 if ($data_card > $self->{'card'})
1728 0 121 if (int $vchain_ref->{'data_card'} > $vchain_ref->{'vchain_card'})
1752 108 3691 if $i == $j
1766 0 29 if @{$self->{'vchain_array'};} == 0
1804 130 383 if exists $Data::Generate::vchain_type->{$chain_type} and exists $Data::Generate::vchain_type->{$chain_type}{'vcol_output_format'}
1819 22 7 if exists $Data::Generate::vchain_type->{$chain_type} and exists $Data::Generate::vchain_type->{$chain_type}{'output_format_fct'}
1820 7 47 if $chain_type eq "INTEGER"
1826 0 3836 if ($last eq $item)
1834 0 54 if $duplicates > 0
1853 450 118 unless defined $format
1861 0 9090 unless defined $card
1862 393 8697 if @composed >= $card
1886 4 25 unless defined $Data::Generate::Parser
1897 0 29 unless $Data::Generate::current->is_valid