A new version of Tests was added to project The Inbox:
http://source.squeak.org/inbox/Tests-jar.454.mcz==================== Summary ====================
Name: Tests-jar.454
Author: jar
Time: 28 April 2021, 3:41:45.571949 pm
UUID: 63612592-7650-d04d-868a-b0a216708d6b
Ancestors: Tests-nice.453
Fix: simpleOuterTest fails to detect an incorrect #outer behavior
After resuming to #outer the execution has to continue right after the ex outer handler block; presently the test only checks whether the execution resumes inside the block but fails to check where it goes next.
I proposed a change in #handleSignal that passed the current test but would lead to an incorrect #outer semantics :| The fix I'm proposing would reveal my error. See the counterexample here:
http://forum.world.st/The-Inbox-Kernel-nice-1391-mcz-tp5129040p5129084.htmlSimple do-it example demonstrating the issue:
resumedCorrectly := false.
[
[ Warning signal ] on: Warning do: [ :ex | ex outer ].
resumedCorrectly := true. "after ex outer continue here"
] on: Warning do: [ :ex | ex resume ].
resumedCorrectly
=============== Diff against Tests-nice.453 ===============
Item was changed:
----- Method: ExceptionTester>>simpleOuterTest (in category 'signaledException tests') -----
simpleOuterTest
"uses #resume"
[[self doSomething.
MyTestNotification signal.
"self doSomethingElse"
self doSomethingExceptional]
on: MyTestNotification
+ do: [:ex | ex outer]. self doSomethingElse]
- do: [:ex | ex outer. self doSomethingElse]]
on: MyTestNotification
do: [:ex | self doYetAnotherThing. ex resume]!