AoC 2024/6: add tests
This commit is contained in:
parent
ef37914813
commit
4b711f4eb4
2 changed files with 24 additions and 0 deletions
14
advent-of-code/2024/day_06/test.rb
Normal file
14
advent-of-code/2024/day_06/test.rb
Normal 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
|
10
advent-of-code/2024/day_06/test.txt
Normal file
10
advent-of-code/2024/day_06/test.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
....#.....
|
||||||
|
.........#
|
||||||
|
..........
|
||||||
|
..#.......
|
||||||
|
.......#..
|
||||||
|
..........
|
||||||
|
.#..^.....
|
||||||
|
........#.
|
||||||
|
#.........
|
||||||
|
......#...
|
Loading…
Reference in a new issue