sUnit- testing for a specific error

Stephane Ducasse ducasse at iam.unibe.ch
Sun May 11 17:57:07 UTC 2003


Hi ned

why what I was syaing was wrong? If I do should: [] raise: MyError this 
is not working?

Stef


On Sunday, May 11, 2003, at 07:40 PM, Ned Konz wrote:

> On Sunday 11 May 2003 09:53 am, Anthony Adachi wrote:
>> ...The error thrown should be:  "Error: Object is not
>> in the collection.". However, the code above only
>> checks for a generic Error.
>>
>> Is it even possible for sUnit to check if a specific
>> error has occurred rather than just testing that any
>> kind of error has occurred?
>
> Well, the problem is that many things are just raising Error.
>
> I just posted a CS that lets you also test the exception description
> for a substring.
>
> -- 
> Ned Konz
> http://bike-nomad.com
> GPG key ID: BEEA7EFE
>
>



More information about the Squeak-dev mailing list