[squeak-dev] The Inbox: KernelTests-ct.417.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Dec 29 17:16:11 UTC 2021


A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-ct.417.mcz

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

Name: KernelTests-ct.417
Author: ct
Time: 29 December 2021, 6:16:09.754165 pm
UUID: 3f9894ac-a774-b44d-85bf-0846ac062cb2
Ancestors: KernelTests-ct.416

Acceptance tests for #runUntilErrorOrReturnFrom:.

Given the complexity of the underlying method, I would like to gently request a short feedback from the author (Eliot) whether all assumptions in these tests are correct. :-)

=============== Diff against KernelTests-ct.416 ===============

Item was added:
+ ----- Method: ContextTest>>testRunUntilErrorOrReturnFromError (in category 'tests') -----
+ testRunUntilErrorOrReturnFromError
+ 
+ 	| context process result sender error |
+ 	process := [self error] newProcess.
+ 	process runUntil: [:ctxt | ctxt receiver == self].
+ 	context := process suspendedContext.
+ 	sender := context sender.
+ 	
+ 	result := context runUntilErrorOrReturnFrom: context.
+ 	context := result first.
+ 	error := result second.
+ 	
+ 	self assert: (context hasSender: sender).
+ 	self assert: (Error handles: error).!

Item was added:
+ ----- Method: ContextTest>>testRunUntilErrorOrReturnFromNoError (in category 'tests') -----
+ testRunUntilErrorOrReturnFromNoError
+ 
+ 	| context process result sender error |
+ 	process := [6 * 7] newProcess.
+ 	process runUntil: [:ctxt | ctxt receiver == self].
+ 	context := process suspendedContext.
+ 	sender := context sender.
+ 	
+ 	result := context runUntilErrorOrReturnFrom: context.
+ 	context := result first.
+ 	error := result second.
+ 	
+ 	self assert: sender equals: context.
+ 	self assert: nil equals: error.
+ 	self assert: 42 equals: context top.!



More information about the Squeak-dev mailing list