23 lines
404 B
Perl
23 lines
404 B
Perl
use lib qw~ . ~;
|
|
|
|
use Part1;
|
|
use Part2;
|
|
|
|
use Test2::V0;
|
|
use Path::Tiny;
|
|
|
|
my $sample = Part1::read_file( path('sample')->lines );
|
|
my $input= Part1::read_file( path('input')->lines );
|
|
|
|
subtest 'part 1' => sub {
|
|
is Part1::solve($sample) => 18;
|
|
is Part1::solve($input) => 2336;
|
|
};
|
|
|
|
subtest 'part 2' => sub {
|
|
is Part2::solve($sample) => 9;
|
|
is Part2::solve($input) => 1831;
|
|
};
|
|
|
|
done_testing();
|