36 lines
296 B
Go
36 lines
296 B
Go
package day01
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestPart1(t *testing.T) {
|
|
r := Part1(`L68
|
|
L30
|
|
R48
|
|
L5
|
|
R60
|
|
L55
|
|
L1
|
|
L99
|
|
R14
|
|
L82`)
|
|
assert.Equal(t, 3, r)
|
|
}
|
|
|
|
func TestPart2(t *testing.T) {
|
|
r := Part2(`L68
|
|
L30
|
|
R48
|
|
L5
|
|
R60
|
|
L55
|
|
L1
|
|
L99
|
|
R14
|
|
L82`)
|
|
assert.Equal(t, 6, r)
|
|
}
|