Branch Coverage

blib/lib/Games/Solitaire/Verify/App/CmdLine/Expand.pm
Criterion Covered Total %
branch 0 20 0.0


line true false branch
41 0 0 if (not defined $variant_params)
57 0 0 unless ($n == 1 or $n == 2)
74 0 0 unless (defined $proc_val)
87 0 0 unless (exists $empty_stacks_filled_by_map{$val})
99 0 0 unless (exists $seq_moves{$val})
106 0 0 unless &GetOptionsFromArray($argv, 'g|game|variant=s', sub { my(undef, $game) = @_; $variant_params = $variant_map->get_variant_by_id($game); if (not defined $variant_params) { die "Unknown variant '${game}'!\n"; } ; } , 'freecells-num=i', sub { my(undef, $n) = @_; $variant_params->num_freecells($n); } , 'stacks-num=i', sub { my(undef, $n) = @_; $variant_params->num_columns($n); } , 'decks-num=i', sub { my(undef, $n) = @_; unless ($n == 1 or $n == 2) { die 'Decks should be 1 or 2.'; } ; $variant_params->num_decks($n); } , 'sequences-are-built-by=s', sub { my(undef, $val) = @_; my(%seqs_build_by) = (map({$_, $_;} 'alt_color', 'suit', 'rank'), 'alternate_color', 'alt_color'); my $proc_val = $seqs_build_by{$val}; unless (defined $proc_val) { die "Unknown sequences-are-built-by '${val}'!"; } ; $variant_params->seqs_build_by($proc_val); } , 'empty-stacks-filled-by=s', sub { my(undef, $val) = @_; my(%empty_stacks_filled_by_map) = map({$_, 1;} 'kings', 'any', 'none'); unless (exists $empty_stacks_filled_by_map{$val}) { die "Unknown empty stacks filled by '${val}'!"; } ; $variant_params->empty_stacks_filled_by($val); } , 'sequence-move=s', sub { my(undef, $val) = @_; my(%seq_moves) = map({$_, 1;} 'limited', 'unlimited'); unless (exists $seq_moves{$val}) { die "Unknown sequence move '${val}'!"; } ; $variant_params->sequence_move($val); } )
110 0 0 unless (defined $filename)
130 0 0 if ($filename eq '-') { }
136 0 0 unless open $fh, '<', $filename
151 0 0 if (not $verdict) { }