-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay12_test.go
43 lines (40 loc) · 859 Bytes
/
Day12_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
package main
import "testing"
func TestComputeDay12a(t *testing.T) {
type args struct {
input string
}
tests := []struct {
name string
args args
want int
}{
{ "Day 12 - Part 1 - example", args {"F10\nN3\nF7\nR90\nF11"}, 25},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ComputeDay12a(tt.args.input); got != tt.want {
t.Errorf("ComputeDay12a() = %v, want %v", got, tt.want)
}
})
}
}
func TestComputeDay12b(t *testing.T) {
type args struct {
input string
}
tests := []struct {
name string
args args
want int
}{
{ "Day 12 - Part 2 - example", args {"F10\nN3\nF7\nR90\nF11"}, 286},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ComputeDay12b(tt.args.input); got != tt.want {
t.Errorf("ComputeDay12b() = %v, want %v", got, tt.want)
}
})
}
}