Skip to content

Commit 60ce860

Browse files
committed
Fixed broken test runner
1 parent da4620c commit 60ce860

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

day-2/main_test.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ func Test_day2_part1(t *testing.T) {
3636
},
3737
}
3838
for _, tt := range tests {
39-
t.Run(tt.name, func(t *testing.T) {
40-
if got := part1(tt.input); got != tt.want {
41-
t.Errorf("part1() = %v, want %v", got, tt.want)
42-
}
43-
})
39+
if tt.run {
40+
t.Run(tt.name, func(t *testing.T) {
41+
if got := part1(tt.input); got != tt.want {
42+
t.Errorf("part1() = %v, want %v", got, tt.want)
43+
}
44+
})
45+
}
4446
}
4547
}
4648

@@ -73,11 +75,13 @@ func Test_day2_part2(t *testing.T) {
7375
},
7476
}
7577
for _, tt := range tests {
76-
t.Run(tt.name, func(t *testing.T) {
77-
if got := part2(tt.input); got != tt.want {
78-
t.Errorf("part2() = %v, want %v", got, tt.want)
79-
}
80-
})
78+
if tt.run {
79+
t.Run(tt.name, func(t *testing.T) {
80+
if got := part2(tt.input); got != tt.want {
81+
t.Errorf("part2() = %v, want %v", got, tt.want)
82+
}
83+
})
84+
}
8185
}
8286
}
8387

0 commit comments

Comments
 (0)