[fpc-pascal] fpcUnit testing Exceptions
Graeme Geldenhuys
graemeg.lists at gmail.com
Fri Jul 14 15:22:10 CEST 2006
> I would try and test this:
>
> AssertException('Failing on 3', EUnknownSlideType,
> TRunMethod(@si.SlideTypeDB));
It gives a "Variable identifier expected" just before the dot.
I even tried putting the si.SlideTypeDB inside a Local Procedure and
passing @<procedurename> but that also didn't work. :-(
Example
procedue Testcase;
procedure LocalCall;
begin
si.SlideTypeDB;
end
begin
AssertException('Failing on 3', EUnknownSlideType, @LocalCall);
end;
Graeme.
--
There's no place like 127.0.0.1
More information about the fpc-pascal
mailing list