Marcel Taeumel uploaded a new version of ToolsTests to project The Treated Inbox: http://source.squeak.org/treated/ToolsTests-jar.105.mcz
==================== Summary ====================
Name: ToolsTests-jar.105 Author: jar Time: 24 May 2021, 3:14:58.469073 pm UUID: d928e860-c443-7943-820b-8b74e3120013 Ancestors: ToolsTests-nice.104
Complement latest #terminate in the Inbox. Test unwind semantics for nested Unhandled errors aborted via debugger's Abandon (interpreted as terminate).
=============== Diff against ToolsTests-nice.104 ===============
Item was added: + ----- Method: DebuggerTests>>test19ProcessUnwindsAfterDebuggerClose (in category 'tests') ----- + test19ProcessUnwindsAfterDebuggerClose + "Closing a debugger on a suspended process means terminating that process." + + | x1 x2 x3 x4 | + x1 := x2 := x3 := x4 := false. + process := + [ + [ + [ ] ensure: [ + [self error: 'outer error'] ensure: [ + x1 := true]. + x2 := true] + ] ensure: [ + x3 := true]. + x4 := true + ] fork. + Processor yield. + + "make sure process is suspended and none of the unwind blocks has finished yet" + self assert: process isSuspended. + self deny: x1 | x2 | x3 | x4. + + "now find and close the debugger and make sure all unwind blocks have finished" + self ensureDebugger. + debugger close. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
Item was added: + ----- Method: DebuggerTests>>test20ProcessUnwindsAfterDebuggerClose (in category 'tests') ----- + test20ProcessUnwindsAfterDebuggerClose + "Closing a debugger on a suspended process means terminating that process." + + | x1 x2 x3 x4 | + x1 := x2 := x3 := x4 := false. + process := + [ + [ + [ ] ensure: [ + [] ensure: [ + self error: 'inner error'. + x1 := true]. + x2 := true] + ] ensure: [ + x3 := true]. + x4 := true + ] fork. + Processor yield. + + "make sure process is suspended and none of the unwind blocks has finished yet" + self assert: process isSuspended. + self deny: x1 | x2 | x3 | x4. + + "now find and close the debugger and make sure all unwind blocks have finished" + self ensureDebugger. + debugger close. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
Item was added: + ----- Method: DebuggerTests>>test21ProcessUnwindsAfterDebuggerClose (in category 'tests') ----- + test21ProcessUnwindsAfterDebuggerClose + "Closing a debugger on a suspended process means terminating that process." + + | x1 x2 x3 x4 | + x1 := x2 := x3 := x4 := false. + process := + [ + [ + [ ] ensure: [ + [self error: 'outer error'] ensure: [ + self error: 'inner error'. + x1 := true]. + x2 := true] + ] ensure: [ + x3 := true]. + x4 := true + ] fork. + Processor yield. + + "make sure process is suspended and none of the unwind blocks has finished yet" + self assert: process isSuspended. + self deny: x1 | x2 | x3 | x4. + + "now find and close the debugger and let the unwind continue to the next error" + self ensureDebugger. + process := [debugger close] fork. + Processor yield. + + "make sure process is suspended and none of the unwind blocks has finished yet" + self assert: process isSuspended. + self deny: x1 | x2 | x3 | x4. + + "now find and close the debugger and make sure all unwind blocks have finished" + self ensureDebugger. + debugger close. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
Item was added: + ----- Method: DebuggerTests>>test22ProcessUnwindsAfterDebuggerClose (in category 'tests') ----- + test22ProcessUnwindsAfterDebuggerClose + "Closing a debugger on a suspended process means terminating that process." + + | x1 x2 x3 x4 | + x1 := x2 := x3 := x4 := false. + process := + [ + [ + [self error: 'outer error'] ensure: [ + [self error: 'middle error'] ensure: [ + self error: 'inner error'. + x1 := true]. + x2 := true] + ] ensure: [ + x3 := true]. + x4 := true + ] fork. + Processor yield. + + "make sure process is suspended and none of the unwind blocks has finished yet" + self assert: process isSuspended. + self deny: x1 | x2 | x3 | x4. + + "now find and close the debugger and let the unwind continue to the next error" + self ensureDebugger. + process := [debugger close] fork. + Processor yield. + + "make sure process is suspended and none of the unwind blocks has finished yet" + self assert: process isSuspended. + self deny: x1 | x2 | x3 | x4. + + "now find and close the debugger and let the unwind continue to the next error" + self ensureDebugger. + process := [debugger close] fork. + Processor yield. + + "make sure process is suspended and none of the unwind blocks has finished yet" + self assert: process isSuspended. + self deny: x1 | x2 | x3 | x4. + + "now find and close the debugger and make sure all unwind blocks have finished" + self ensureDebugger. + debugger close. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
packages@lists.squeakfoundation.org