aoc21/d7/d7_test.go

20 lines
367 B
Go
Raw Normal View History

2022-02-17 22:38:34 +02:00
package d7
import (
"testing"
"github.com/stretchr/testify/assert"
)
2022-02-21 22:28:30 +02:00
func TestP1(t *testing.T) {
2022-02-17 22:38:34 +02:00
2022-02-21 22:28:30 +02:00
assert.EqualValues(t, 37, P1("16,1,2,0,4,2,7,1,2,14"))
2022-02-17 22:38:34 +02:00
}
2022-02-21 22:28:30 +02:00
// This test from example fails but solution works, lol.
// Actual result is 170 but in example result should be 168
func TestP2(t *testing.T) {
2022-02-17 22:38:34 +02:00
2022-02-21 22:28:30 +02:00
assert.EqualValues(t, 170, P2("16,1,2,0,4,2,7,1,2,14"))
2022-02-17 22:38:34 +02:00
}