Added panic in suite.Run if Test* method has args or returning values
P.S. This is my first ever opensource contribution, so I'm very open to any code logic/styling criticism!
Changes
Now, before calling Suite method there's an additional check for signature correctness: it should have not more than 1 arg (receiver) and 0 returning values
If Test* method signature fails the above check test panics with the message: testify: suite method <MethodName> shouldn't have any arguments or returning values
Added test cases for incorrect signature variants
Motivation
As @wvell mentioned in issue #1508 currently, suite.Run returns an ambiguous error when executing with instance of Suite that has incorrect Test* methods signatures.
Summary
Added panic in suite.Run if Test* method has args or returning values
P.S. This is my first ever opensource contribution, so I'm very open to any code logic/styling criticism!
Changes
testify: suite method <MethodName> shouldn't have any arguments or returning values
Motivation
As @wvell mentioned in issue #1508 currently,
suite.Run
returns an ambiguous error when executing with instance of Suite that has incorrectTest*
methods signatures.Related issues
Closes #1508