[fpc-pascal] Testing if exception raised in fpcUnit
Michael Van Canneyt
michael at freepascal.org
Mon Nov 5 14:07:10 CET 2012
On Mon, 5 Nov 2012, Graeme Geldenhuys wrote:
> On 2012-11-05 12:49, ik wrote:
>> So how do I do it ?
> Create a method of the test class, and pass that to AssertException.
> Alternatively, do it manually as follows:
> on E: exception do
> CheckEquals(EUnknownSlideType.ClassName, E.ClassName, 'Failing on 2');
This will not detect if no exception is raised, only if the right exception is raised in case one is raised.
More information about the fpc-pascal