Skip to content

Commit

Permalink
Fix tidyall tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Jul 10, 2023
1 parent 00af700 commit 90f70ff
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ sub _calc_freecell_max_seq_move
my $to_empty = ( defined( $args->{to_empty} ) ? $args->{to_empty} : 0 );

return ( ( $self->num_empty_freecells() + 1 )
<< ( $self->num_empty_columns() - $to_empty ) );
<< ( $self->num_empty_columns() - $to_empty ) );
}

sub _calc_empty_stacks_filled_by_any_card_max_seq_move
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@

my $recs = $max_scan->{r};
my $iters_count = max(
map { $_->[$ITERS_IDX] }
grep { $_->[$STATUS_IDX] && ( $_->[$TIME_DELTA_IDX] < $quota ) }
map { $_->[$ITERS_IDX] }
grep { $_->[$STATUS_IDX] && ( $_->[$TIME_DELTA_IDX] < $quota ) }
@{$recs}
);
my $time_delta = max(
map { $_->[$TIME_DELTA_IDX] }
grep { $_->[$STATUS_IDX] && ( $_->[$TIME_DELTA_IDX] < $quota ) }
map { $_->[$TIME_DELTA_IDX] }
grep { $_->[$STATUS_IDX] && ( $_->[$TIME_DELTA_IDX] < $quota ) }
@{$recs}
);

Expand Down
4 changes: 2 additions & 2 deletions fc-solve/scripts/FindSeed.pm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ sub from_lines
%$args,
results => [
sort { $a->iters <=> $b->iters }
map {
map {
my $s = $_;
$s =~ s#\A([0-9]+) = ##;
my $deal = $1;
Expand All @@ -100,7 +100,7 @@ sub from_lines
seed => $seed,
}
);
} @{ $args->{lines} },
} @{ $args->{lines} },
],
}
);
Expand Down
2 changes: 1 addition & 1 deletion fc-solve/scripts/extract-states-as-lines.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
print "]"
. (
join "",
map { "$_\\n" }
map { "$_\\n" }
sort { $a cmp $b } ( @cols, $normalized_fc_l, $founds_l )
) . "\n";
}
Expand Down
4 changes: 2 additions & 2 deletions fc-solve/scripts/process-and-sort-make-output.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sub foo
return (
( $s =~ /\s-c\s+(\S*?\.c)\s*\n?\z/ )
? do
{
{
my $ret = $1;

# print "Ret=$ret \n";
Expand All @@ -22,7 +22,7 @@ sub foo
}

print map { s/[ \t]+/ /gr }
sort { ( foo($a) cmp foo($b) ) or ( $a cmp $b ) }
sort { ( foo($a) cmp foo($b) ) or ( $a cmp $b ) }
grep {
not /-Dfreecell_solver_EXPOR/
|| /-Dfcs_gen_ms_freecell_boards_EXPORTS/
Expand Down
6 changes: 3 additions & 3 deletions fc-solve/site/wml/lib/FreecellSolver/GenDealsCharts1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ sub format_num
sub _calc_deal_nums
{
return [
sort { $a <=> $b }
grep { /\A[0-9]+\z/ }
map { s#.*/##mrs =~ s#\.dump\.txt\z##mrs } glob(
sort { $a <=> $b }
grep { /\A[0-9]+\z/ }
map { s#.*/##mrs =~ s#\.dump\.txt\z##mrs } glob(
"src/charts/fc-pro--4fc-intractable-deals--report/data/*.dump.txt")
];
}
Expand Down
2 changes: 1 addition & 1 deletion fc-solve/source/scripts/gen-cmd-line-radix-tree.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sub gen_radix_tree
};
%%
EOF
map { "$_, $strings_to_opts_map{$_}\n" }
map { "$_, $strings_to_opts_map{$_}\n" }
sort { $a cmp $b } keys %strings_to_opts_map,
);
return;
Expand Down
2 changes: 1 addition & 1 deletion fc-solve/source/t/lib/FC_Solve/InlineWrap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sub import
NAME => $pkg,
INC => join(
" ",
map { "-I$_" }
map { "-I$_" }
map { bin_file($_), src_file($_) } (
["include"], ["rinutils/rinutils/include"],
["patsolve/patsolve"], ["patsolve/patsolve/include"],
Expand Down
8 changes: 4 additions & 4 deletions fc-solve/source/t/t/fc-solve-output-Test-Trap.t
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ qq#Unknown option "-invalidopt". Type "$FC_SOLVE__RAW --help" for usage informat
/\A\[\[Num FCS Moves\]\]=([0-9]+)\r?\z/
? ( not( $1 > 0 ) )
: 1;
}
grep { /\A\[\[Num FCS Moves\]\]/ } @lines
}
grep { /\A\[\[Num FCS Moves\]\]/ } @lines
],
[],
"All FCS Move counts are valid",
Expand All @@ -114,8 +114,8 @@ qq#Unknown option "-invalidopt". Type "$FC_SOLVE__RAW --help" for usage informat
/\A\[\[Num FCPro Moves\]\]=([0-9]+)\r?\z/
? ( not( $1 > 0 ) )
: 1;
}
grep { /\A\[\[Num FCPro Moves\]\]/ } @lines
}
grep { /\A\[\[Num FCPro Moves\]\]/ } @lines
],
[],
"All FCPro Move counts are valid.",
Expand Down

0 comments on commit 90f70ff

Please sign in to comment.