Skip to content
Snippets Groups Projects
Commit b8a96380 authored by Josh Brooks's avatar Josh Brooks
Browse files

Allow for multiple testing signatures in NewManagerTesting

parent 45ad1fa2
Branches
Tags
No related merge requests found
...@@ -33,9 +33,16 @@ func newManager() *Manager { ...@@ -33,9 +33,16 @@ func newManager() *Manager {
} }
} }
func NewManagerTesting(t *testing.T) *Manager { func NewManagerTesting(i interface{}) *Manager {
if t == nil { switch i.(type) {
jww.FATAL.Panicf("NewMangerTesting is for testing only") case *testing.T:
break
case *testing.M:
break
case *testing.B:
break
default:
jww.FATAL.Panicf("NewManagerTesting is restricted to testing only. Got %T", i)
} }
return newManager() return newManager()
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment