This commit is contained in:
Gareth
2025-12-02 06:54:15 +00:00
parent 7f6c31c003
commit 90083f28e5
4 changed files with 141 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
package day02
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestPart1(t *testing.T) {
r := Part1(`11-22,95-115,998-1012,1188511880-1188511890,222220-222224,1698522-1698528,446443-446449,38593856-38593862,565653-565659,824824821-824824827,2121212118-2121212124`)
assert.Equal(t, 1227775554, r)
}
func TestPart2(t *testing.T) {
r := Part2(`11-22,95-115,998-1012,1188511880-1188511890,222220-222224,1698522-1698528,446443-446449,38593856-38593862,565653-565659,824824821-824824827,2121212118-2121212124`)
assert.Equal(t, 4174379265, r)
}