Fixed benchmark tests to be able to run with Go 1.13+

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2020-02-26 12:12:18 -07:00
parent 62bacf1044
commit 7ab9c76f2b
2 changed files with 5 additions and 12 deletions

View File

@@ -1077,10 +1077,6 @@ var benchSublistSl = NewSublistWithCache()
// https://github.com/golang/go/issues/31859
func TestMain(m *testing.M) {
flag.Parse()
os.Exit(m.Run())
}
func init() {
initSublist := false
flag.Visit(func(f *flag.Flag) {
if f.Name == "test.bench" {
@@ -1096,6 +1092,7 @@ func init() {
}
addWildcards()
}
os.Exit(m.Run())
}
func subsInit(pre string, toks []string) {