Levente Uzonyi uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-ul.141.mcz ==================== Summary ==================== Name: KernelTests-ul.141 Author: ul Time: 23 February 2010, 4:34:11.478 pm UUID: 4a889716-e318-9449-8db6-c3aff723fcbb Ancestors: KernelTests-nice.140 - tests for the #cull: protocoll =============== Diff against KernelTests-nice.140 =============== Item was added: + ----- Method: BlockClosureTest>>testCullCull (in category 'tests - evaluating') ----- + testCullCull + + self shouldnt: [ [ ] cull: 1 cull: 2 ] raise: Error. + self shouldnt: [ [ :x | ] cull: 1 cull: 2 ] raise: Error. + self shouldnt: [ [ :x :y | ] cull: 1 cull: 2 ] raise: Error. + self should: [ [ :x :y :z | ] cull: 1 cull: 2 ] raise: Error. + self should: [ [ :x :y :z :a | ] cull: 1 cull: 2 ] raise: Error. + self should: [ [ :x :y :z :a :b | ] cull: 1 cull: 2 ] raise: Error. + self assert: ([ 0 ] cull: 1 cull: 2) = 0. + self assert: ([ :x | x ] cull: 1 cull: 2) = 1. + self assert: ([ :x :y | y ] cull: 1 cull: 2) = 2. ! Item was added: + ----- Method: BlockClosureTest>>testCullCullCullCull (in category 'tests - evaluating') ----- + testCullCullCullCull + + self shouldnt: [ [ ] cull: 1 cull: 2 cull: 3 cull: 4 ] raise: Error. + self shouldnt: [ [ :x | ] cull: 1 cull: 2 cull: 3 cull: 4 ] raise: Error. + self shouldnt: [ [ :x :y | ] cull: 1 cull: 2 cull: 3 cull: 4 ] raise: Error. + self shouldnt: [ [ :x :y :z | ] cull: 1 cull: 2 cull: 3 cull: 4 ] raise: Error. + self shouldnt: [ [ :x :y :z :a | ] cull: 1 cull: 2 cull: 3 cull: 4 ] raise: Error. + self should: [ [ :x :y :z :a :b | ] cull: 1 cull: 2 cull: 3 cull: 4 ] raise: Error. + self assert: ([ 0 ] cull: 1 cull: 2 cull: 3 cull: 4) = 0. + self assert: ([ :x | x ] cull: 1 cull: 2 cull: 3 cull: 4) = 1. + self assert: ([ :x :y | y ] cull: 1 cull: 2 cull: 3 cull: 4) = 2. + self assert: ([ :x :y :z | z ] cull: 1 cull: 2 cull: 3 cull: 4) = 3. + self assert: ([ :x :y :z :a | a ] cull: 1 cull: 2 cull: 3 cull: 4) = 4.! Item was added: + ----- Method: BlockClosureTest>>testCullCullCull (in category 'tests - evaluating') ----- + testCullCullCull + + self shouldnt: [ [ ] cull: 1 cull: 2 cull: 3 ] raise: Error. + self shouldnt: [ [ :x | ] cull: 1 cull: 2 cull: 3 ] raise: Error. + self shouldnt: [ [ :x :y | ] cull: 1 cull: 2 cull: 3 ] raise: Error. + self shouldnt: [ [ :x :y :z | ] cull: 1 cull: 2 cull: 3 ] raise: Error. + self should: [ [ :x :y :z :a | ] cull: 1 cull: 2 cull: 3 ] raise: Error. + self should: [ [ :x :y :z :a :b | ] cull: 1 cull: 2 cull: 3 ] raise: Error. + self assert: ([ 0 ] cull: 1 cull: 2 cull: 3) = 0. + self assert: ([ :x | x ] cull: 1 cull: 2 cull: 3) = 1. + self assert: ([ :x :y | y ] cull: 1 cull: 2 cull: 3) = 2. + self assert: ([ :x :y :z | z ] cull: 1 cull: 2 cull: 3) = 3. ! Item was added: + ----- Method: BlockClosureTest>>testCull (in category 'tests - evaluating') ----- + testCull + + self shouldnt: [ [ ] cull: 1 ] raise: Error. + self shouldnt: [ [ :x | ] cull: 1 ] raise: Error. + self should: [ [ :x :y | ] cull: 1 ] raise: Error. + self should: [ [ :x :y :z | ] cull: 1 ] raise: Error. + self should: [ [ :x :y :z :a | ] cull: 1 ] raise: Error. + self should: [ [ :x :y :z :a :b | ] cull: 1 ] raise: Error. + self assert: ([ 0 ] cull: 1) = 0. + self assert: ([ :x | x ] cull: 1) = 1 ! Item was added: + TestCase subclass: #BlockClosureTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'KernelTests-Methods'! |
Free forum by Nabble | Edit this page |