adventofcode/2020/08/tests.t

26 lines
362 B
Perl
Raw Normal View History

2021-12-05 16:51:21 +00:00
use Test2::V0;
use Path::Tiny;
require './part1.pm';
require './part2.pm';
subtest part1 => sub {
is part1::solution(<<END) => 5, 'sample';
nop +0
acc +1
jmp +4
acc +3
jmp -3
acc -99
acc +1
jmp -4
acc +6
END
is part1::solution( path('input')->slurp ) => 1262, 'part1';
};
is part2::solution( path('input')->slurp ) => 1643, 'part2';
done_testing();