Files
adventofcode/2024/gareth/day02/day02_test.go
Gareth 8f5cb6b236 Day02
2024-12-02 13:40:07 +00:00

28 lines
340 B
Go

package day02
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestPart1(t *testing.T) {
r := Part1(`7 6 4 2 1
1 2 7 8 9
9 7 6 2 1
1 3 2 4 5
8 6 4 4 1
1 3 6 7 9`)
assert.Equal(t, 2, r)
}
func TestPart2(t *testing.T) {
r := Part2(`7 6 4 2 1
1 2 7 8 9
9 7 6 2 1
1 3 2 4 5
8 6 4 4 1
1 3 6 7 9`)
assert.Equal(t, 4, r)
}