The Inbox: Tests-jr.456.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Tests-jr.456.mcz

commits-2
A new version of Tests was added to project The Inbox:
http://source.squeak.org/inbox/Tests-jr.456.mcz

==================== Summary ====================

Name: Tests-jr.456
Author: jr
Time: 25 April 2021, 5:31:14.946128 pm
UUID: 2bc77074-a400-4842-b306-6b1cff37aaba
Ancestors: Tests-nice.455

Test case for precise handler reactivation when nested exceptions are signalled.

At the moment of writing this, this is broken in Squeak Trunk and the test case would run endlessly if there were no timeout. The reason is that the inner error handler is reactivated when the signal emitted by it is resumed.

Related versions:
- Kernel-nice.1384
- Kernel-nice.1391
- ToolBuilder-Kernel-nice.141
- Kernel-nice.142

=============== Diff against Tests-nice.455 ===============

Item was added:
+ ----- Method: ExceptionTests>>testHandlersReactivatedOnResume (in category 'tests - outer') -----
+ testHandlersReactivatedOnResume
+ <timeout: 0.5>
+ | result |
+ result := [
+ [
+ [self error: 'to be handled by the inner handler']
+ on: Error do:
+ [:e |
+ Warning signal: 'to be resumed by the middle handler'.
+ "After resuming from the Warning, its handler must be active again."
+ Warning signal: 'to be resumed by the middle handler'.
+ self error: 'to be handled by the outer handler'.
+ e return: 'inner result']]
+ on: Warning do:
+ [:e | e resume "This must not rearm the inner Error handler above"]]
+ on: Error do:
+ [:e | e return: 'outer result'].
+ self assert: 'outer result' equals: result.!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tests-jr.456.mcz

Jakob Reschke
Great, a copy & paste error slipped into the commit message. Should
have been ToolBuilder-Kernel-nice.142, not Kernel-nice.142.

Will submit again based on the same parent version with the message
fixed. Should be Tests-jr.457 then.

Please move this to Treated.

Am So., 25. Apr. 2021 um 17:31 Uhr schrieb <[hidden email]>:

>
> A new version of Tests was added to project The Inbox:
> http://source.squeak.org/inbox/Tests-jr.456.mcz
>
> ==================== Summary ====================
>
> Name: Tests-jr.456
> Author: jr
> Time: 25 April 2021, 5:31:14.946128 pm
> UUID: 2bc77074-a400-4842-b306-6b1cff37aaba
> Ancestors: Tests-nice.455
>
> Test case for precise handler reactivation when nested exceptions are signalled.
>
> At the moment of writing this, this is broken in Squeak Trunk and the test case would run endlessly if there were no timeout. The reason is that the inner error handler is reactivated when the signal emitted by it is resumed.
>
> Related versions:
> - Kernel-nice.1384
> - Kernel-nice.1391
> - ToolBuilder-Kernel-nice.141
> - Kernel-nice.142
>
> =============== Diff against Tests-nice.455 ===============
>
> Item was added:
> + ----- Method: ExceptionTests>>testHandlersReactivatedOnResume (in category 'tests - outer') -----
> + testHandlersReactivatedOnResume
> +       <timeout: 0.5>
> +       | result |
> +       result := [
> +               [
> +                       [self error: 'to be handled by the inner handler']
> +                               on: Error do:
> +                                       [:e |
> +                                       Warning signal: 'to be resumed by the middle handler'.
> +                                       "After resuming from the Warning, its handler must be active again."
> +                                       Warning signal: 'to be resumed by the middle handler'.
> +                                       self error: 'to be handled by the outer handler'.
> +                                       e return: 'inner result']]
> +                       on: Warning do:
> +                               [:e | e resume "This must not rearm the inner Error handler above"]]
> +               on: Error do:
> +                       [:e | e return: 'outer result'].
> +       self assert: 'outer result' equals: result.!
>
>