]> fbox.kageds.com Git - adventofcode.git/blob - 2023/go/day03/day03_test.go
day07
[adventofcode.git] / 2023 / go / day03 / day03_test.go
1 package day03
2
3 import (
4 "testing"
5
6 "github.com/stretchr/testify/require"
7 )
8
9 func TestPart1(t *testing.T) {
10 r := Part1(
11 `467..114..
12 ...*......
13 ..35..633.
14 ......#...
15 617*......
16 .....+.58.
17 ..592.....
18 ......755.
19 ...$.*....
20 .664.598..`)
21 require.Equal(t, 4361, r)
22 }
23
24 func TestPart2(t *testing.T) {
25 r := Part2(
26 `467..114..
27 ...*......
28 ..35..633.
29 ......#...
30 617*......
31 .....+.58.
32 ..592.....
33 ......755.
34 ...$.*....
35 .664.598..`)
36 require.Equal(t, 467835, r)
37 }