adventofcode/2023/09/part2.t

25 lines
407 B
Perl
Raw Normal View History

2023-12-09 17:44:53 +00:00
use 5.38.0;
use Test2::V0;
use Path::Tiny;
use Part2;
my $input = path('input')->slurp;
is Part2::predict(qw/0 3 6 9 12 15/) => -3;
is Part2::predict(qw/1 3 6 10 15 21/) => 0;
is Part2::predict(qw/10 13 16 21 30 45/) => 5;
is Part2::solution_2(<<END) => 2;
0 3 6 9 12 15
1 3 6 10 15 21
10 13 16 21 30 45
END
isnt Part2::solution_2($input) => -59;
2023-12-09 17:58:19 +00:00
is Part2::solution_2($input) => 1031;
2023-12-09 17:44:53 +00:00
done_testing;