Files
adventofcode/2023/gareth/day01/day01_test.go
Gareth Evans 2843713a0b Day_1
2023-12-01 10:12:50 +00:00

26 lines
357 B
Go

package day01
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestPart1(t *testing.T) {
r := Part1(`1abc2
pqr3stu8vwx
a1b2c3d4e5f
treb7uchet`)
assert.Equal(t, 142, r)
}
func TestPart2(t *testing.T) {
r := Part2(`two1nine
eightwothree
abcone2threexyz
xtwone3four
4nineeightseven2
zoneight234
7pqrstsixteen`)
assert.Equal(t, 281, r)
}