Day09
This commit is contained in:
22
2024/gareth/day09/day09_test.go
Normal file
22
2024/gareth/day09/day09_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package day09
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPart1(t *testing.T) {
|
||||
r := Part1(`12345`)
|
||||
assert.Equal(t, 60, r)
|
||||
}
|
||||
|
||||
func TestPart1Long(t *testing.T) {
|
||||
r := Part1(`2333133121414131402`)
|
||||
assert.Equal(t, 1928, r)
|
||||
}
|
||||
|
||||
func TestPart2(t *testing.T) {
|
||||
r := Part2(`2333133121414131402`)
|
||||
assert.Equal(t, 2858, r)
|
||||
}
|
||||
Reference in New Issue
Block a user