[fpc-pascal] Testing if exception raised in fpcUnit

Graeme Geldenhuys graeme at geldenhuys.co.uk
Mon Nov 5 14:15:11 CET 2012


On 2012-11-05 13:07, Michael Van Canneyt wrote:
> 
> This will not detect if no exception is raised, only if the right
> exception is raised in case one is raised.


You are correct. An extra test is needed just before the except block.
As your example shows, simply calling Fail(...) if no exception was raised.


Regards,
  - Graeme -




More information about the fpc-pascal mailing list