File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments