updates
This commit is contained in:
25
2024/go/day17/day17_test.go
Normal file
25
2024/go/day17/day17_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package day17
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestPart1(t *testing.T) {
|
||||
r := Part1(`Register A: 729
|
||||
Register B: 0
|
||||
Register C: 0
|
||||
|
||||
Program: 0,1,5,4,3,0`)
|
||||
require.Equal(t, "4,6,3,5,6,3,5,2,1,0", r)
|
||||
}
|
||||
|
||||
func TestPart2(t *testing.T) {
|
||||
r := Part2(`Register A: 2024
|
||||
Register B: 0
|
||||
Register C: 0
|
||||
|
||||
Program: 0,3,5,4,3,0`)
|
||||
require.Equal(t, 117440, r)
|
||||
}
|
||||
Reference in New Issue
Block a user