Possible AV in Spring.Testing

Issue #183 resolved
Zuo Baoquan created an issue
TTestFoo = class(TTestCase) 
published
    [TestCase('')]
   procedure Fact(a, b: string);
end;

Spring.Testing Line 449-459 assumes Length(values)=Length(parameters). Also, what about default parameters?

Runtime fatal exception is not expected in this case.

Comments (5)

  1. Stefan Glienke repo owner

    Agreed, the code should check the proper argument length from the attribute first.

    As for default values RTTI does not have any information about them. It is simply impossible to dynamically invoke such a method without filling all parameters explicitly.

  2. Zuo Baoquan reporter

    OK. I missed that. It'll be helpful to show this limitation within some documentation and error message.

  3. Log in to comment