aoc21/d9/d9_test.go

28 lines
349 B
Go
Raw Permalink Normal View History

2022-02-21 22:01:00 +02:00
package d9
import (
"testing"
"github.com/stretchr/testify/assert"
)
2022-02-21 22:28:30 +02:00
func TestP1(t *testing.T) {
2022-02-21 22:01:00 +02:00
input := `2199943210
3987894921
9856789892
8767896789
9899965678`
2022-02-21 22:28:30 +02:00
assert.EqualValues(t, 15, P1(input))
2022-02-21 22:01:00 +02:00
}
2022-02-21 22:28:30 +02:00
func TestP2(t *testing.T) {
2022-02-21 22:01:00 +02:00
input := `2199943210
3987894921
9856789892
8767896789
9899965678`
2022-02-21 22:28:30 +02:00
assert.EqualValues(t, 1134, P2(input))
2022-02-21 22:01:00 +02:00
}