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
No related branches found
No related tags found
No related merge requests found
......@@ -33,9 +33,16 @@ func newManager() *Manager {
}
}
func NewManagerTesting(t *testing.T) *Manager {
if t == nil {
jww.FATAL.Panicf("NewMangerTesting is for testing only")
func NewManagerTesting(i interface{}) *Manager {
switch i.(type) {
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()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment