About exception propagation with ensure:

stéphane ducasse ducasse at iam.unibe.ch
Fri Oct 28 17:37:29 UTC 2005


I was stupid....
Now I'm reading the ExceptionTest.... this is excellent!
I'm learning a lot just reading these tests!
Thanks andreas :)

I saw that
     doubleOuterTest does not have a doubleOuterTestResults

Stef




>
>
>
>
>>> Now if you move the ^newClass into the ensure block as
>>>
>>>
>>>
>>>
>>>
>>
>> As I just happen to have worked with Smalllint I know that you should
>> never put a return into a block being the argument of #ensure:,
>> #valueNowOrOnUnwindDo:, #ifCurtailed: or #valueOnUnwindDo:. There  
>> is a
>> Smalllint-Rule "Contains a return in an ensure: block".
>>
>> I think your test get never really executed, because you quit them
>> with ^1 before SUnit is actually able to check something in
>> #should:raise ... The ^1 will quit your method immediately, and it
>> will executed all the time because it is within the ensure.
>>
>>
>>
>>
>
> cool.
> Thanks for that feedback.
> I should write a better test then.
>
> Stef
>
>
>
>
>
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>







More information about the Squeak-dev mailing list