The Trunk: CollectionsTests-ul.276.mcz

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

The Trunk: CollectionsTests-ul.276.mcz

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