adventofcode/2023/06/part1.t

23 lines
438 B
Perl
Raw Normal View History

2023-12-06 15:31:39 +00:00
use 5.38.0;
use Test2::V0;
use Path::Tiny;
2023-12-06 16:07:57 +00:00
use File::Serialize;
2023-12-06 15:31:39 +00:00
use Part1;
my $input = path('input')->slurp;
my $example = path('example')->slurp;
2023-12-06 16:07:57 +00:00
my $solutions = deserialize_file('solutions.yml');
2023-12-06 15:31:39 +00:00
is [ map { Part1::race_solution(@$_)} Part1::parse_file($example)]
=> [4,8,9];
is Part1::solution_1($example) => 288;
cmp_ok Part1::solution_1($input), '<' ,230202;
2023-12-06 16:07:57 +00:00
is Part1::solution_1($input) => $solutions->{1};
2023-12-06 15:31:39 +00:00
done_testing;