Files
adventofcode/2024/go/day17/day17_test.go
2025-01-13 18:48:07 +00:00

26 lines
381 B
Go

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)
}