This commit is contained in:
Gareth
2024-12-08 13:47:09 +00:00
parent 2c9b7766e3
commit a64c3ef3c4
4 changed files with 977 additions and 4 deletions

View File

@@ -0,0 +1,33 @@
package day07
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestPart1(t *testing.T) {
r := Part1(`190: 10 19
3267: 81 40 27
83: 17 5
156: 15 6
7290: 6 8 6 15
161011: 16 10 13
192: 17 8 14
21037: 9 7 18 13
292: 11 6 16 20`)
assert.Equal(t, 3749, r)
}
func TestPart2(t *testing.T) {
r := Part2(`190: 10 19
3267: 81 40 27
83: 17 5
156: 15 6
7290: 6 8 6 15
161011: 16 10 13
192: 17 8 14
21037: 9 7 18 13
292: 11 6 16 20`)
assert.Equal(t, 11387, r)
}