The Trunk: Tests-jr.457.mcz

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

The Trunk: Tests-jr.457.mcz

commits-2
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-jr.457.mcz

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

Name: Tests-jr.457
Author: jr
Time: 25 April 2021, 5:39:42.729128 pm
UUID: 38bb7c0a-ba18-0e43-866f-4f252c20a2d8
Ancestors: Tests-nice.455

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

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
- ToolBuilder-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.!