Last active
February 23, 2018 12:06
-
-
Save thiagocaiubi/afcfb57f45cef2e892146402ac5d368a to your computer and use it in GitHub Desktop.
A boilerplate for Go table-driven tests running in parallel
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_test | |
import "testing" | |
func TestMain(t *testing.T) { | |
testCases := []struct { | |
name string | |
}{ | |
{ | |
name: "test name", | |
}, | |
} | |
for _, testCase := range testCases { | |
testCase := testCase | |
t.Run(testCase.name, func(t *testing.T) { | |
t.Parallel() | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment