-
-
Save prashantv/9febe96e7df2b0d5311fa3b4aedb3059 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"testing" | |
) | |
func TestFoo(t *testing.T) { | |
t.Parallel() | |
tests1 := []struct { | |
name string | |
v string | |
}{ | |
{"outer1-1", "outer1-1"}, | |
{"outer1-2", "outer1-2"}, | |
} | |
tests2 := []struct { | |
name string | |
v string | |
}{ | |
{"outer2-1", "outer2-1"}, | |
{"outer2-2", "outer2-2"}, | |
} | |
for _, tt1 := range tests1 { | |
tt1 := tt1 | |
t.Run(tt1.name, func(t *testing.T) { | |
for _, tt2 := range tests2 { | |
tt2 := tt2 | |
t.Run(tt2.name, func(t *testing.T) { | |
t.Parallel() | |
fmt.Println(tt1.v, tt2.v) | |
}) | |
} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using paralleltest 1.0.3: