This commit is contained in:
2025-12-04 11:52:35 +00:00
parent 90083f28e5
commit 9c2e2c68dd
10 changed files with 560 additions and 5 deletions

View File

@@ -0,0 +1,35 @@
package day04
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestPart1(t *testing.T) {
r := Part1(`..@@.@@@@.
@@@.@.@.@@
@@@@@.@.@@
@.@@@@..@.
@@.@@@@.@@
.@@@@@@@.@
.@.@.@.@@@
@.@@@.@@@@
.@@@@@@@@.
@.@.@@@.@.`)
require.Equal(t, 13, r)
}
func TestPart2(t *testing.T) {
r := Part2(`..@@.@@@@.
@@@.@.@.@@
@@@@@.@.@@
@.@@@@..@.
@@.@@@@.@@
.@@@@@@@.@
.@.@.@.@@@
@.@@@.@@@@
.@@@@@@@@.
@.@.@@@.@.`)
require.Equal(t, 43, r)
}