Skip to content
Snippets Groups Projects
Commit 9de661e7 authored by Niamh Nikali's avatar Niamh Nikali
Browse files

Make NewManagerTesting take any testing type

parent 5686bc0f
Branches
Tags
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 for 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