Files
adventofcode/2023/go/day16/day16_test.go
2024-12-01 08:01:55 +00:00

38 lines
445 B
Go

package day16
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestPart1(t *testing.T) {
r := Part1(
`.|...\....
|.-.\.....
.....|-...
........|.
..........
.........\
..../.\\..
.-.-/..|..
.|....-|.\
..//.|...`)
require.Equal(t, 46, r)
}
func TestPart2(t *testing.T) {
r := Part2(
`.|...\....
|.-.\.....
.....|-...
........|.
..........
.........\
..../.\\..
.-.-/..|..
.|....-|.\
..//.|...`)
require.Equal(t, 51, r)
}