[Pkg] The Trunk: CollectionsTests-ar.134.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Feb 2 03:18:04 UTC 2010


Andreas Raab uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ar.134.mcz

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

Name: CollectionsTests-ar.134
Author: ar
Time: 1 February 2010, 7:17:53.486 pm
UUID: 4adad849-c3b2-044d-b825-2f77af92664a
Ancestors: CollectionsTests-ul.133

Tests for beginsWithAnyOf: and endsWithAnyOf:.

=============== Diff against CollectionsTests-ul.133 ===============

Item was added:
+ ----- Method: SequenceableCollectionTest>>testBeginsWithAnyOf (in category 'testing - testing') -----
+ testBeginsWithAnyOf
+ 	"We can't test SequenceableCollection directly. However, we can test a sampling of its descendants."
+ 
+ 	| la oc |
+ 	la := #(1 2 3 4 5 6).
+ 	oc := OrderedCollection new.
+ 	oc add: 1; add: 2; add: 3.
+ 
+ 	self assert: (la beginsWithAnyOf: #((17) (1) (42))).
+ 	self assert: (la beginsWithAnyOf: #((17) (1 2) (42))).
+ 	self assert: (la beginsWithAnyOf: #((17) (1 2 3) (42))).
+ 	self deny: (la beginsWithAnyOf: #()).
+ 	self deny: (la beginsWithAnyOf: #(())).
+ 	self deny: (la beginsWithAnyOf: #((42))).
+ !

Item was added:
+ ----- Method: SequenceableCollectionTest>>testEndsWithAnyOf (in category 'testing - testing') -----
+ testEndsWithAnyOf
+ 	"We can't test SequenceableCollection directly. However, we can test a sampling of its descendants."
+ 
+ 	| la oc |
+ 	la := #(6 5 4 3 2 1).
+ 	oc := OrderedCollection new.
+ 	oc add: 3; add: 2; add: 1.
+ 
+ 	self assert: (la endsWithAnyOf: #((17) (1) (42))).
+ 	self assert: (la endsWithAnyOf: #((17) (2 1) (42))).
+ 	self assert: (la endsWithAnyOf: #((17) (3 2 1) (42))).
+ 	self deny: (la endsWithAnyOf: #()).
+ 	self deny: (la endsWithAnyOf: #(())).
+ 	self deny: (la endsWithAnyOf: #((42))).
+ !



More information about the Packages mailing list