[Pkg] The Trunk: ToolsTests-jar.111.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jun 13 07:48:32 UTC 2022


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

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

Name: ToolsTests-jar.111
Author: jar
Time: 9 June 2022, 1:57:53.457529 pm
UUID: 3119b2a0-1c29-5d47-ab08-9a95a4691027
Ancestors: ToolsTests-ct.109

Fix two failing and/or incorrect tests; complement Tools-jar.1161.

For further info see http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-January/218167.html

This changeset replaces Tools-jar.1159 (i.e. please remove from Inbox)

=============== Diff against ToolsTests-ct.109 ===============

Item was changed:
  ----- Method: DebuggerTests>>test19Abandon (in category 'tests') -----
  test19Abandon
  	"When the debugger is abandoned, the interrupted process is terminated aggressively, i.e., all not yet started unwind contexts are executed. Further errors that occur during unwinding lead to another debugger showing up. This is the acceptance test equivalent for ProcessTest >> #testTerminateNestedUnwindAggressively."
  
  	| x y z userProcess |
  	process := Process
  		forBlock:
+ 			[[x := 1] ensure: 
+ 				[[y := 1.
+ 				self error: #first.
+ 				y := 2] ensure:
+ 					[z := 1.
+ 					self error: #second.
+ 					z := 2]].
- 			[x := 1.
- 			[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 abandon] forkAt: Processor activePriority + 1.
  	Processor yield.
  	self findDebugger.
  	
  	self deny: process isTerminated.
  	self assert: userProcess isTerminated.
  	self deny: debugger isNil.
  	self assert: {1. 1. 1} equals: {x. y. z}.
  	self assert: (debugger containingWindow label includesSubstring: #second).
  	
  	userProcess := [debugger proceed] forkAt: Processor activePriority + 1.
  	Processor yield.
  	self findDebugger.
  	
  	self assert: process isTerminated.
  	self assert: userProcess isTerminated.
  	self assert: debugger isNil.
  	self assert: {1. 1. 2} equals: {x. y. z}.!

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 |
  	process := Process
  		forBlock:
+ 			[[x := 1] ensure: 
+ 				[[y := 1.
+ 				self error: #first.
+ 				y := 2] ensure:
+ 					[z := 1.
+ 					self error: #second.
+ 					z := 2]].
- 			[x := 1.
- 			[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 assert: userProcess isTerminated.
  	self deny: debugger isNil.
  	self assert: {1. 2. 1} equals: {x. y. z}.
  	self assert: (debugger containingWindow label includesSubstring: #second).
  	
  	userProcess := [debugger proceed] forkAt: Processor activePriority + 1.
  	Processor yield.
  	self findDebugger.
  	
  	self assert: process isTerminated.
  	self assert: userProcess isTerminated.
  	self assert: debugger isNil.
+ 	self assert: {1. 2. 2} equals: {x. y. z}.!
- 	self assert: {2. 2. 2} equals: {x. y. z}.!



More information about the Packages mailing list