Then show your failing test case method so we can see what you are doing
wrong. Just saying "it doesn't work" gives us no information about what
might be going wrong. For example, how are you invoking the program?

Rick

On Fri, Oct 19, 2018 at 3:42 PM P.O. Jonsson <[email protected]> wrote:

> I was unclear: I am writing test cases for ALL sample programs, the
> intention is that they will go into the unit test framework later when I
> have done them all. I promised Erich to have a go at it.
>
> I have done 10 tests successfully so far, but for this one I could not get
> around the error. I have successfully detected syntax errors in running
> other sample programs so it is only this one I need help with (at the
> moment).
>
> Von meinen Macbook gesendet
>
> Hälsningar/Regards/Grüsse,
> P.O. Jonsson
> [email protected]
>
>
>
> Am 19.10.2018 um 21:37 schrieb Rick McGuire <[email protected]>:
>
> This program is not using the unit test framework so expectSyntax is not
> going to work.
>
> Rick
>
> On Fri, Oct 19, 2018 at 3:33 PM P.O. Jonsson <[email protected]> wrote:
>
>> Dear developers,
>>
>> In one of the sample files interface.rex there is an intended error
>> produced to show the point. The output is the following:
>>
>>     70 *-* say g~name
>> REX0093E: Error 93 running /Users/po/ooRexxSamples/oorexx/interface.REX
>> line 70:  Incorrect call to method.
>> REX0665E: Error 93.965:  Method NAME is ABSTRACT and cannot be directly
>> invoked.
>>
>> I am trying to catch this error by using
>>
>> self~expectSyntax(93.965) (or self~expectSyntax(93) and many variations)
>> but cannot catch it. The source code in question is
>>
>> -- a mixin is still a class and can be instantiated.  The abstract methods
>> -- will give an error if invoked
>> g=.shape~new
>> if g~isa(.shape) then say "a" g~class~id "is a shape"
>> -- invoking abstract method results in a runtime error.
>> say g~name
>> say "g~area:" g~area
>>
>> How do I catch a runtime error in a testcase? can it be done?
>>
>> I have enclosed the sample program
>>
>>
>> Von meinen Macbook gesendet
>>
>> Hälsningar/Regards/Grüsse,
>> P.O. Jonsson
>> [email protected]
>>
>>
>>
>> _______________________________________________
>> Oorexx-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to