[squeak-dev] The Trunk: ToolsTests-jar.116.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jun 20 08:34:15 UTC 2022


Marcel Taeumel uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-jar.116.mcz

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

Name: ToolsTests-jar.116
Author: jar
Time: 17 June 2022, 3:15:02.875775 pm
UUID: 0cb238ec-203e-4c44-81b8-f9aed7f866e9
Ancestors: ToolsTests-ct.115

fix failing tests and remove #expectedFailures

=============== Diff against ToolsTests-ct.115 ===============

Item was removed:
- ----- Method: DebuggerTests>>expectedFailures (in category 'failures') -----
- expectedFailures
- 
- 	^ #(
- 	test23TerminateDoubleErrorInEnsure
- 	test24TerminateTripleErrorInEnsure)!

Item was changed:
  ----- Method: DebuggerTests>>test20TerminateProcess (in category 'tests') -----
  test20TerminateProcess
  	"When the debugger's process is terminated, all unwind contexts, including already entered ones, are executed. Further errors that occur during unwinding lead to another debugger showing up. This is the acceptance test equivalent for ProcessTest >> #testTerminateNestedUnwind."
  
+ 	| x y z userProcess |
- 	| x y z userProcess userProcess2 |
  	process := Process
  		forBlock:
  			[[x := 1] ensure: 
  				[[y := 1.
  				self error: #first.
  				y := 2] ensure:
  					[z := 1.
  					self error: #second.
  					z := 2]].
  			x := 2]
  		runUntil: [:ctx | y = 1].
  	self should: {x. y. z} = {1. 1. nil}.
  	debugger := process debug.
  	
  	userProcess := [debugger proceed] forkAt: Processor activePriority + 1.
  	Processor yield.
  	self findDebugger.
  	
  	self deny: process isTerminated.
  	self assert: userProcess isTerminated.
  	self deny: debugger isNil.
  	self assert: {1. 1. nil} equals: {x. y. z}.
  	self assert: (debugger containingWindow label includesSubstring: #first).
  	
  	userProcess := [debugger terminateProcess] forkAt: Processor activePriority + 1.
  	Processor yield.
  	self findDebugger.
  	
  	self deny: process isTerminated.
- 	self deny: userProcess isTerminated.
  	self deny: debugger isNil.
  	self assert: {1. 2. 1} equals: {x. y. z}.
  	self assert: (debugger containingWindow label includesSubstring: #second).
  	
+ 	debugger proceed.
- 	userProcess2 := [debugger proceed] forkAt: Processor activePriority + 1.
  	Processor yield.
- 	self findDebugger.
  	
  	self assert: process isTerminated.
  	self assert: userProcess isTerminated.
+ 	self assert: {1. 2. 2} equals: {x. y. z}.
+ 	
+ 	"tear down the debugger"
+ 	self findDebugger.
+ 	self assert: debugger isNil!
- 	self assert: userProcess2 isTerminated.
- 	self assert: debugger isNil.
- 	self assert: {1. 2. 2} equals: {x. y. z}.!

Item was changed:
  ----- 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.
+ 	Processor yield.	  "yield to make sure process termination gets started"
+ 
- 	
  	self assert: process isTerminated.
  	self assert: x1 & x2 & x3.
+ 	self deny: x4.
+ 
+ 	"tear down the debugger"
+ 	self findDebugger.
+ 	self assert: debugger isNil!
- 	self deny: x4!

Item was changed:
  ----- 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.
+ 	Processor yield.	  "yield to make sure process termination gets started"
+ 
- 	
  	self assert: process isTerminated.
  	self assert: x1 & x2 & x3.
+ 	self deny: x4.
+ 
+ 	"tear down the debugger"
+ 	self findDebugger.
+ 	self assert: debugger isNil!
- 	self deny: x4!

Item was changed:
  ----- Method: DebuggerTests>>test23TerminateDoubleErrorInEnsure (in category 'tests') -----
  test23TerminateDoubleErrorInEnsure
  	"Closing a debugger on a suspended process means terminating that process."
  	
+ 	| x1 x2 x3 x4 userProcess |
- 	| 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 findDebugger.
+ 	userProcess := [debugger terminateProcess] forkAt: Processor activePriority + 1.
+ 	Processor yield. 
- 	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 findDebugger.
- 	self ensureDebugger.
  	debugger terminateProcess.
+ 	Processor yield.
  	
  	self assert: process isTerminated.
+ 	self assert: userProcess isTerminated.
  	self assert: x1 & x2 & x3.
+ 	self deny: x4.
+ 
+ 	"tear down the debugger"
+ 	self findDebugger.
+ 	self assert: debugger isNil!
- 	self deny: x4!

Item was changed:
  ----- Method: DebuggerTests>>test24TerminateTripleErrorInEnsure (in category 'tests') -----
  test24TerminateTripleErrorInEnsure
  	"Closing a debugger on a suspended process means terminating that process."
  	
+ 	| x1 x2 x3 x4 userProcess1 userProcess2 |
- 	| 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 findDebugger.
+ 	userProcess1 := [debugger terminateProcess] forkAt: Processor activePriority + 1. 
- 	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 findDebugger.
+ 	userProcess2 := [debugger terminateProcess] forkAt: Processor activePriority + 1. 
- 	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 findDebugger.
+ 	debugger terminateProcess. 
+ 	Processor yield.
- 	self ensureDebugger.
- 	debugger terminateProcess.
  	
  	self assert: process isTerminated.
+ 	self assert: userProcess1 isTerminated.
+ 	self assert: userProcess2 isTerminated.
  	self assert: x1 & x2 & x3.
+ 	self deny: x4.
+ 
+ 	"tear down the debugger"
+ 	self findDebugger.
+ 	self assert: debugger isNil!
- 	self deny: x4!



More information about the Squeak-dev mailing list