[fpc-pascal] fpcUnit testing Exceptions
    Graeme Geldenhuys 
    graemeg.lists at gmail.com
       
    Sat Jul 15 10:41:13 CEST 2006
    
    
  
Hi,
> where
> TRunMethod = procedure of object;
>
> How is SlideTypeDB defined?
>
> the correct way should be
>
> AssertException('Failing on 3', EUnknownSlideType, @si.SlideTypeDB);
>
> provided SlideTypeDB is a simple procedure with no parameters
> and you are using
> {$mode objfpc}
si  =  Is a Slide Information class.  You give it a slide name, and
can then retrieve all kinds of information from it.
si.SlideTypeDB  =  I think is a read-only property returning a string
(I don't have the code infront of me).  The property getter method
raises an exception, if it can't figure out the Slide Type from the
name.
Yes I always code in {$mode objfpc}.
I think the problem is the SlideTypeDB which is a property!  I will
change it to a standard function returning a string and try
@si.SlideTypeDB again.
Regards,
  Graeme.
-- 
There's no place like 127.0.0.1
    
    
More information about the fpc-pascal
mailing list