The Trunk: KernelTests-cmm.254.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-cmm.254.mcz

commits-2
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).
+
+
+ !