On 7/15/06, Dean Zobec <[EMAIL PROTECTED]> wrote:
I would create a procedure in the TTestCase class that would internaly
access this property and pass this procedure instead.
I created a local procedure and tried to pass that (See a message I
posted 2 replies ago). It didn't work, but I was on
Graeme Geldenhuys wrote:
>
> 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.
I guess it won't work, since assertException expects a procedure
(TRunMethod = procedure of Object).
I would crea
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 Informatio
Graeme Geldenhuys wrote:
> Hi,
>
> Is it possible to test the code below using the AssertException()
> call? I am sure it must be, I am just not sure how to use it.
>
> This is the work-around I have now, untill I can figure out how to use
> AssertException() correctly.
> ---
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 @ but that also didn't work. :-(
Example
pr
Graeme,
I would try and test this:
AssertException('Failing on 3', EUnknownSlideType,
TRunMethod(@si.SlideTypeDB));
Haven't been able to test though, but it's what comes to mind. Perhaps it
helps.
Darius
> Hi,
>
> Is it possible to test the code below using the AssertException()
> call? I am