Day01
This commit is contained in:
27
2024/gareth/day01/day01_test.go
Normal file
27
2024/gareth/day01/day01_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package day01
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPart1(t *testing.T) {
|
||||
r := Part1(`3 4
|
||||
4 3
|
||||
2 5
|
||||
1 3
|
||||
3 9
|
||||
3 3`)
|
||||
assert.Equal(t, 11, r)
|
||||
}
|
||||
|
||||
func TestPart2(t *testing.T) {
|
||||
r := Part2(`3 4
|
||||
4 3
|
||||
2 5
|
||||
1 3
|
||||
3 9
|
||||
3 3`)
|
||||
assert.Equal(t, 31, r)
|
||||
}
|
||||
Reference in New Issue
Block a user