@@ -26,64 +26,59 @@ func Suite(suite interface{}) interface{} {
2626
2727var (
2828 oldListFlag = flag .Bool ("gocheck.list" , false , "List the names of all tests that will be run" )
29- oldWorkFlag = flag .Bool ("gocheck.work" , false , "Display and do not remove the test working directory" )
3029
3130 newListFlag = flag .Bool ("check.list" , false , "List the names of all tests that will be run" )
32- newWorkFlag = flag .Bool ("check.work" , false , "Display and do not remove the test working directory" )
3331)
3432
3533// TestingT runs all test suites registered with the Suite function,
3634// printing results to stdout, and reporting any failures back to
3735// the "testing" package.
3836func TestingT (t * testing.T ) {
3937 t .Helper ()
40- conf := & RunConf {
41- KeepWorkDir : * oldWorkFlag || * newWorkFlag ,
42- }
4338 if * oldListFlag || * newListFlag {
4439 w := bufio .NewWriter (os .Stdout )
45- for _ , name := range ListAll (conf ) {
40+ for _ , name := range ListAll () {
4641 fmt .Fprintln (w , name )
4742 }
4843 w .Flush ()
4944 return
5045 }
51- RunAll (t , conf )
46+ RunAll (t )
5247}
5348
5449// RunAll runs all test suites registered with the Suite function, using the
5550// provided run configuration.
56- func RunAll (t * testing.T , runConf * RunConf ) {
51+ func RunAll (t * testing.T ) {
5752 t .Helper ()
5853 for _ , suite := range allSuites {
5954 t .Run (suiteName (suite ), func (t * testing.T ) {
60- Run (t , suite , runConf )
55+ Run (t , suite )
6156 })
6257 }
6358}
6459
6560// Run runs the provided test suite using the provided run configuration.
66- func Run (t * testing.T , suite interface {}, runConf * RunConf ) {
61+ func Run (t * testing.T , suite interface {}) {
6762 t .Helper ()
68- runner := newSuiteRunner (suite , runConf )
63+ runner := newSuiteRunner (suite )
6964 runner .run (t )
7065}
7166
7267// ListAll returns the names of all the test functions registered with the
7368// Suite function that will be run with the provided run configuration.
74- func ListAll (runConf * RunConf ) []string {
69+ func ListAll () []string {
7570 var names []string
7671 for _ , suite := range allSuites {
77- names = append (names , List (suite , runConf )... )
72+ names = append (names , List (suite )... )
7873 }
7974 return names
8075}
8176
8277// List returns the names of the test functions in the given
8378// suite that will be run with the provided run configuration.
84- func List (suite interface {}, runConf * RunConf ) []string {
79+ func List (suite interface {}) []string {
8580 var names []string
86- runner := newSuiteRunner (suite , runConf )
81+ runner := newSuiteRunner (suite )
8782 for _ , t := range runner .tests {
8883 names = append (names , t .String ())
8984 }
0 commit comments