]> fbox.kageds.com Git - adventofcode.git/blob - 2023/gareth/day01/day01_test.go
move unit64 back to int
[adventofcode.git] / 2023 / gareth / day01 / day01_test.go
1 package day01
2
3 import (
4 "github.com/stretchr/testify/assert"
5 "testing"
6 )
7
8 func TestPart1(t *testing.T) {
9 r := Part1(`1abc2
10 pqr3stu8vwx
11 a1b2c3d4e5f
12 treb7uchet`)
13 assert.Equal(t, 142, r)
14 }
15
16 func TestPart2(t *testing.T) {
17 r := Part2(`two1nine
18 eightwothree
19 abcone2threexyz
20 xtwone3four
21 4nineeightseven2
22 zoneight234
23 7pqrstsixteen`)
24 assert.Equal(t, 281, r)
25 }