Branch Coverage

blib/lib/Games/Solitaire/Verify/FromOtherSolversBase.pm
Criterion Covered Total %
branch 12 24 50.0


line true false branch
36 0 4 if (not defined $variant_params)
52 0 0 unless ($n == 1 or $n == 2)
69 0 0 unless (defined $proc_val)
82 0 0 unless (exists $empty_stacks_filled_by_map{$val})
94 0 0 unless (exists $seq_moves{$val})
101 0 4 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); } )
105 0 4 unless (defined $filename)
112 0 4 unless (defined $sol_filename)
199 266 1459 $col->len == 0 ? :
221 160 116 defined $card ? :
232 85 160 if ($src_col_idx < 0) { }
235 43 42 if ($src_fc_idx < 0)