AoC 2024/6: add tests

This commit is contained in:
Ivan R. 2024-12-09 12:35:21 +05:00
parent ef37914813
commit 4b711f4eb4
Signed by: lumin
GPG key ID: E0937DC7CD6D3817
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,14 @@
require "test/unit"
require_relative "lib"
class TestLib < Test::Unit::TestCase
def test_example_1
matrix = File.readlines("test.txt", chomp: true)
assert_equal(41, walk(matrix))
end
def test_example_2
matrix = File.readlines("test.txt", chomp: true)
assert_equal(6, count_possible_obstructions(matrix))
end
end

View file

@ -0,0 +1,10 @@
....#.....
.........#
..........
..#.......
.......#..
..........
.#..^.....
........#.
#.........
......#...