day1
This commit is contained in:
34
2025/go/day01/day01_test.go
Normal file
34
2025/go/day01/day01_test.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package day01
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require")
|
||||
|
||||
func TestPart1(t *testing.T) {
|
||||
r := Part1(`L68
|
||||
L30
|
||||
R48
|
||||
L5
|
||||
R60
|
||||
L55
|
||||
L1
|
||||
L99
|
||||
R14
|
||||
L82`)
|
||||
require.Equal(t, 3, r)
|
||||
}
|
||||
|
||||
func TestPart2(t *testing.T) {
|
||||
r := Part2(`L68
|
||||
L30
|
||||
R48
|
||||
L5
|
||||
R60
|
||||
L55
|
||||
L1
|
||||
L99
|
||||
R14
|
||||
L82`)
|
||||
require.Equal(t, 6, r)
|
||||
}
|
||||
Reference in New Issue
Block a user