Change to guard clause

pull/579/merge
ariley 2020-04-23 13:10:43 +01:00 committed by Martijn
parent a41f2db807
commit f43aa3c488
1 changed files with 11 additions and 10 deletions

View File

@ -181,7 +181,9 @@ func Run(t *testing.T, suite TestingSuite) {
func runTests(t testing.TB, tests []testing.InternalTest) {
if len(tests) == 0 {
t.Log("warning: no tests to run")
} else {
return
}
r, ok := t.(runner)
if !ok { // backwards compatibility with Go 1.6 and below
if !testing.RunTests(allTestsFilter, tests) {
@ -194,7 +196,6 @@ func runTests(t testing.TB, tests []testing.InternalTest) {
r.Run(test.Name, test.F)
}
}
}
// Filtering method according to set regular expression
// specified command-line argument -m