2023-12-01 21:54:23 +01:00
|
|
|
package _023
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2023-12-02 12:25:29 +01:00
|
|
|
func TestD01Part1(t *testing.T) {
|
2023-12-01 21:54:23 +01:00
|
|
|
tests := []testCase{
|
|
|
|
{"inputs/day01_test1", 142},
|
|
|
|
{"inputs/day01", 53974},
|
|
|
|
}
|
|
|
|
for _, test := range tests {
|
2023-12-02 12:25:29 +01:00
|
|
|
t.Run(test.filename, check(test, D01Part1))
|
2023-12-01 21:54:23 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-02 12:25:29 +01:00
|
|
|
func TestD01Part2(t *testing.T) {
|
2023-12-01 21:54:23 +01:00
|
|
|
tests := []testCase{
|
|
|
|
{"inputs/day01_test2", 281},
|
|
|
|
{"inputs/day01_test3", 277},
|
|
|
|
{"inputs/day01", 52840},
|
|
|
|
}
|
|
|
|
for _, test := range tests {
|
2023-12-02 12:25:29 +01:00
|
|
|
t.Run(test.filename, check(test, D01Part2))
|
2023-12-01 21:54:23 +01:00
|
|
|
}
|
|
|
|
}
|