Marcel Taeumel uploaded a new version of ToolsTests to project The Treated Inbox: http://source.squeak.org/treated/ToolsTests-jar.109.mcz
==================== Summary ====================
Name: ToolsTests-jar.109 Author: jar Time: 19 December 2021, 6:47:42.938686 pm UUID: 62c82ef6-3dee-aa46-9eba-de210be19a62 Ancestors: ToolsTests-ct.108
supersede ToolsTests-jar.105 modified tests to reflect the change in the default "close" debugger action to #terminateAggresively introduced in Kernel-ct.1434 (ct); "standard" termination of the debugged process remains available in the debugger window menu; these tests explore this form of termination of the debugged process (i.e. not via the "close" button).
Please remove ToolsTests-jar.105 from the Inbox
=============== Diff against ToolsTests-ct.108 ===============
Item was added: + ----- Method: DebuggerTests>>test21TerminateErrorInEnsureBlock (in category 'tests') ----- + test21TerminateErrorInEnsureBlock + "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 terminateProcess. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
Item was added: + ----- Method: DebuggerTests>>test22TerminateErrorInNestedEnsureBlock (in category 'tests') ----- + test22TerminateErrorInNestedEnsureBlock + "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 terminateProcess. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
Item was added: + ----- Method: DebuggerTests>>test23TerminateDoubleErrorInEnsure (in category 'tests') ----- + test23TerminateDoubleErrorInEnsure + "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 terminateProcess] 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 terminateProcess. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
Item was added: + ----- Method: DebuggerTests>>test24TerminateTripleErrorInEnsure (in category 'tests') ----- + test24TerminateTripleErrorInEnsure + "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 terminateProcess] 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 terminateProcess] 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 terminateProcess. + + self assert: process isTerminated. + self assert: x1 & x2 & x3. + self deny: x4!
packages@lists.squeakfoundation.org