You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
625 B
Go
38 lines
625 B
Go
package day22
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"gitea.paas.celticinfo.fr/oabrivard/aoc2023/utils"
|
|
)
|
|
|
|
func TestPart1(t *testing.T) {
|
|
lines := []string{
|
|
"1,0,1~1,2,1", // 1
|
|
"0,0,2~2,0,2", // 2
|
|
"0,2,3~2,2,3", // 3
|
|
"0,0,4~0,2,4", // 4
|
|
"2,0,5~2,2,5", // 5
|
|
"0,1,6~2,1,6", // 6
|
|
"1,1,8~1,1,9", // 7
|
|
}
|
|
|
|
result, _ := Part1(lines)
|
|
//result := process(lines)
|
|
|
|
if result != 5 {
|
|
t.Fatalf("expected 5, got %d", result)
|
|
}
|
|
}
|
|
|
|
func TestPart1WithInput(t *testing.T) {
|
|
lines := utils.ReadLines("input.txt")
|
|
|
|
result, _ := Part1(lines)
|
|
//result := process(lines)
|
|
|
|
if result != 428 {
|
|
t.Fatalf("expected 428, got %d", result)
|
|
}
|
|
}
|