Advent of Code Solutions
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
432 B

package main
import (
"strings"
"testing"
)
func TestDay01(t *testing.T) {
input := `3 4
4 3
2 5
1 3
3 9
3 3`
p1, p2 := strings.NewReader(input), strings.NewReader(input)
if got, expected := part1(p1), "11"; got != expected {
t.Errorf("day01 part 1 = %s; expected %s", got, expected)
}
if got, expected := part2(p2), "31"; got != expected {
t.Errorf("day01 part 2 = %s; expected %s", got, expected)
}
}