Files
adventofcode/2023/go/day03/day03_test.go
2023-12-04 13:31:13 +00:00

38 lines
454 B
Go

package day03
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestPart1(t *testing.T) {
r := Part1(
`467..114..
...*......
..35..633.
......#...
617*......
.....+.58.
..592.....
......755.
...$.*....
.664.598..`)
require.Equal(t, 4361, r)
}
func TestPart2(t *testing.T) {
r := Part2(
`467..114..
...*......
..35..633.
......#...
617*......
.....+.58.
..592.....
......755.
...$.*....
.664.598..`)
require.Equal(t, 467835, r)
}