[Pkg] The Trunk: CollectionsTests-ul.276.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Feb 26 14:50:13 UTC 2017


Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ul.276.mcz

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

Name: CollectionsTests-ul.276
Author: ul
Time: 26 February 2017, 3:49:59.912456 pm
UUID: 713c55b7-3cee-4998-a660-ccc1c7e19430
Ancestors: CollectionsTests-eem.275, CollectionsTests-tonyg.275

- merged

=============== Diff against CollectionsTests-eem.275 ===============

Item was added:
+ ----- Method: SequenceableCollectionTest>>testIndexOfSubCollectionStartingAt (in category 'tests - accessing') -----
+ testIndexOfSubCollectionStartingAt
+ 	| c |
+ 	c := 'abcdefg' asArray. "NB. As of Collections-topa.733, String already permitted out-of-bounds start indexes, so we are careful here to select the SequenceableCollection implementation by using asArray."
+ 	self assert: (c indexOfSubCollection: 'cde' startingAt: 400) = 0.
+ 	self assert: (c indexOfSubCollection: 'cde' startingAt: 4) = 0.
+ 	self assert: (c indexOfSubCollection: 'cde' startingAt: 1) = 3.
+ 	self assert: (c indexOfSubCollection: 'cde' startingAt: 0) = 3.
+ 	self assert: (c indexOfSubCollection: 'cde' startingAt: -1) = 3.
+ 
+ 	self assert: (c indexOfSubCollection: 'abcdefg' startingAt: 400) = 0.
+ 	self assert: (c indexOfSubCollection: 'abcdefg' startingAt: 4) = 0.
+ 	self assert: (c indexOfSubCollection: 'abcdefg' startingAt: 1) = 1.
+ 	self assert: (c indexOfSubCollection: 'abcdefg' startingAt: 0) = 1.
+ 	self assert: (c indexOfSubCollection: 'abcdefg' startingAt: -1) = 1.
+ 
+ 	self assert: (c indexOfSubCollection: 'abcdefghij' startingAt: 400) = 0.
+ 	self assert: (c indexOfSubCollection: 'abcdefghij' startingAt: 4) = 0.
+ 	self assert: (c indexOfSubCollection: 'abcdefghij' startingAt: 1) = 0.
+ 	self assert: (c indexOfSubCollection: 'abcdefghij' startingAt: 0) = 0.
+ 	self assert: (c indexOfSubCollection: 'abcdefghij' startingAt: -1) = 0.
+ !



More information about the Packages mailing list