Branch Coverage

blib/lib/Business/CN/IdentityCard.pm
Criterion Covered Total %
branch 13 32 40.6


line true false branch
16 0 1 if $id
25 0 2 unless ($id =~ /^(\d{17}(\d|x)|\d{15})$/)
34 2 0 length $id == 18 ? :
49 0 2 unless ($id)
52 2 0 if $self->validate_province and $self->validate_birthday
56 1 1 if $self->err
65 0 2 if (not $province[$$self{'province_code'}]) { }
79 2 0 length $year == 4 ? :
84 2 0 if ($date) { }
96 0 2 if length $$self{'id'} == 15
105 1 1 if ($$self{'postfix'} ne $v_code[$sum % 11])
115 0 0 unless $format
116 0 0 if ($$self{'serial_number'} % 2 == 0) { }
117 0 0 $format eq 'CN' ? :
119 0 0 $format eq 'CN' ? :
127 0 0 if (exists $Business::CN::IdentityCard::District::district{$key}) { }