Day06
This commit is contained in:
35
2024/gareth/day06/day06_test.go
Normal file
35
2024/gareth/day06/day06_test.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package day06
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPart1(t *testing.T) {
|
||||
r := Part1(`....#.....
|
||||
.........#
|
||||
..........
|
||||
..#.......
|
||||
.......#..
|
||||
..........
|
||||
.#..^.....
|
||||
........#.
|
||||
#.........
|
||||
......#...`)
|
||||
assert.Equal(t, 41, r)
|
||||
}
|
||||
|
||||
func TestPart2(t *testing.T) {
|
||||
r := Part2(`....#.....
|
||||
.........#
|
||||
..........
|
||||
..#.......
|
||||
.......#..
|
||||
..........
|
||||
.#..^.....
|
||||
........#.
|
||||
#.........
|
||||
......#...`)
|
||||
assert.Equal(t, 6, r)
|
||||
}
|
||||
Reference in New Issue
Block a user