-
Notifications
You must be signed in to change notification settings - Fork 0
/
day19_test.go
55 lines (49 loc) · 996 Bytes
/
day19_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package main
import (
"os"
"testing"
)
func TestDay19(t *testing.T) {
f, err := os.Open("input/day19_test.txt")
if err != nil {
t.Fatal(err)
}
defer f.Close()
expectA := 79
resultA, resultB := day19a(day19input(f))
t.Run("a", func(t *testing.T) {
if resultA != expectA {
t.Fatalf("expected %d, got %d", expectA, resultA)
}
})
expectB := 3621
t.Run("b", func(t *testing.T) {
if resultB != expectB {
t.Fatalf("expected %d, got %d", expectB, resultB)
}
})
}
func TestDay19Final(t *testing.T) {
f, err := os.Open("input/day19.txt")
if err != nil {
t.Fatal(err)
}
defer f.Close()
expectA := 440
resultA, resultB := day19a(day19input(f))
t.Run("a", func(t *testing.T) {
if resultA != expectA {
t.Fatalf("expected %d, got %d", expectA, resultA)
}
})
expectB := 13382
t.Run("b", func(t *testing.T) {
if resultB != expectB {
t.Fatalf("expected %d, got %d", expectB, resultB)
}
})
}
// func ExampleDay19a() {
// Day19a()
// // Output: 0
// }