[Pkg] The Trunk: KernelTests-cmm.254.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Oct 25 20:02:21 UTC 2013


Chris Muller uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-cmm.254.mcz

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

Name: KernelTests-cmm.254
Author: cmm
Time: 25 October 2013, 3:01:47.351 pm
UUID: 7ab6a8b8-b2d1-414c-a1f9-c164e489eef9
Ancestors: KernelTests-nice.253

Test for valueWithAllPossibleArguments:.

=============== Diff against KernelTests-nice.253 ===============

Item was added:
+ ----- Method: BlockContextTest>>testValueWithAllPossibleArgs (in category 'tests - evaluating') -----
+ testValueWithAllPossibleArgs
+ 	| block  blockWithArg blockWith2Arg |
+ 
+ 	block := [1].
+ 	blockWithArg  := [:arg | arg].
+ 	blockWith2Arg := [:arg1 :arg2 | {arg1. arg2}].
+ 
+ 	self assert: (block valueWithAllPossibleArguments: #()) = 1.
+ 	self assert: (block valueWithAllPossibleArguments: #(1)) = 1.
+ 	
+ 	self assert: (blockWithArg valueWithAllPossibleArguments: #()) = nil.
+ 	self assert: (blockWithArg valueWithAllPossibleArguments: #(1)) = 1.
+ 	self assert: (blockWithArg valueWithAllPossibleArguments: #(1 2)) = #(1 2).
+ 
+ 	self assert: (blockWith2Arg valueWithAllPossibleArguments: #()) = {nil .nil}.
+ 	self assert: (blockWith2Arg valueWithAllPossibleArguments: #(1)) =  {1 . nil}.
+ 	self assert: (blockWith2Arg valueWithAllPossibleArguments: #(1 2)) =  #(1 2).
+ 	self assert: (blockWith2Arg valueWithAllPossibleArguments: #(1 2 3)) = #(1 2).
+ 		
+ 
+ 	!



More information about the Packages mailing list