Days 7,8,9
This commit is contained in:
18
2023/gareth/day09/day09_test.go
Normal file
18
2023/gareth/day09/day09_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package day09
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPart1(t *testing.T) {
|
||||
r := Part1(`0 3 6 9 12 15
|
||||
1 3 6 10 15 21
|
||||
10 13 16 21 30 45`)
|
||||
assert.Equal(t, 114, r)
|
||||
}
|
||||
|
||||
func TestPart2(t *testing.T) {
|
||||
r := Part2(`10 13 16 21 30 45`)
|
||||
assert.Equal(t, 5, r)
|
||||
}
|
||||
Reference in New Issue
Block a user