[Pkg] The Trunk: CollectionsTests-ul.181.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Feb 22 15:32:25 UTC 2011
Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ul.181.mcz
==================== Summary ====================
Name: CollectionsTests-ul.181
Author: ul
Time: 22 February 2011, 4:32:17.481 pm
UUID: f61b5b99-8de8-7a46-a8b7-71e58d9d8a77
Ancestors: CollectionsTests-ul.180
Refactored and extended ReadStreamTest >> #testPositionOfSubCollection.
=============== Diff against CollectionsTests-ul.180 ===============
Item was changed:
----- Method: ReadStreamTest>>testPositionOfSubCollection (in category 'tests - positioning') -----
testPositionOfSubCollection
-
- self assert: ((self streamOn: 'xyz') positionOfSubCollection: 'q' ) = 0.
- self assert: ((self streamOn: 'xyz') positionOfSubCollection: 'x' ) = 1.
+ | stream |
+ stream := self streamOn: 'xyz'.
+ #(
+ '' 1
+ 'q' 0
+ 'x' 1
+ 'y' 2
+ 'z' 3
+ 'xz' 0
+ 'xy' 1
+ 'yz' 2
+ 'xyz' 1) pairsDo: [ :pattern :expectedPosition |
+ self
+ assert: expectedPosition equals: (stream positionOfSubCollection: pattern);
+ assert: 0 equals: stream position ]!
- self assert: ((self streamOn: 'xyz') positionOfSubCollection: 'y' ) = 2.
- self assert: ((self streamOn: 'xyz') positionOfSubCollection: 'z' ) = 3.!
More information about the Packages
mailing list