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