[squeak-dev] The Inbox: CollectionsTests-dtl.213.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 19 19:00:39 UTC 2014


David T. Lewis uploaded a new version of CollectionsTests to project The Inbox:
http://source.squeak.org/inbox/CollectionsTests-dtl.213.mcz

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

Name: CollectionsTests-dtl.213
Author: dtl
Time: 19 January 2014, 2:00:26.702 pm
UUID: 92e880a5-19ae-4168-a858-3ec4520c12b2
Ancestors: CollectionsTests-dtl.212

Move testStreamContentsPositioning to WriteStreamTest

=============== Diff against CollectionsTests-dtl.212 ===============

Item was removed:
- ----- Method: OrderedCollectionTest>>testStreamContentsPositioning (in category 'testStreaming') -----
- testStreamContentsPositioning
- 	"String class>>new:streamContents: optimizes performance by answering the
- 	originalCollection in the case of a stream positioned to the size of the original
- 	collection. This fails if the stream has been repositioned backwards to its original
- 	length."
- 
- 	"(OrderedCollectionTest selector: #testStreamContentsPositioning) debug"
- 
- 	| s |
- 	s := String new: 10 streamContents: [ :strm |
- 			strm nextPutAll: 'XXXXX'.
- 			self assert: 'XXXXX' equals: strm contents.
- 			strm nextPut: $X.
- 			self assert: 'XXXXXX' equals: strm contents.
- 			strm position: strm position - 1.
- 			self assert: 'XXXXX' equals: strm contents.
- 			strm nextPutAll: 'XXXXX'.
- 			self assert: 'XXXXXXXXXX' equals: strm contents.
- 			strm nextPut: $X.
- 			self assert: 'XXXXXXXXXXX' equals: strm contents.
- 			strm position: strm position - 1.
- 			self assert: 'XXXXXXXXXX' equals: strm contents.
- 		].
- 	self assert: 10 equals: s size.
- 	self assert: 'XXXXXXXXXX' equals: s.
- 	
- 	!

Item was added:
+ ----- Method: WriteStreamTest>>testStreamContentsPositioning (in category 'tests - positioning') -----
+ testStreamContentsPositioning
+ 	"String class>>new:streamContents: optimizes performance by answering the
+ 	originalCollection in the case of a stream positioned to the size of the original
+ 	collection. This fails if the stream has been repositioned backwards to its original
+ 	length."
+ 
+ 	"(OrderedCollectionTest selector: #testStreamContentsPositioning) debug"
+ 
+ 	| s |
+ 	s := String new: 10 streamContents: [ :strm |
+ 			strm nextPutAll: 'XXXXX'.
+ 			self assert: 'XXXXX' equals: strm contents.
+ 			strm nextPut: $X.
+ 			self assert: 'XXXXXX' equals: strm contents.
+ 			strm position: strm position - 1.
+ 			self assert: 'XXXXX' equals: strm contents.
+ 			strm nextPutAll: 'XXXXX'.
+ 			self assert: 'XXXXXXXXXX' equals: strm contents.
+ 			strm nextPut: $X.
+ 			self assert: 'XXXXXXXXXXX' equals: strm contents.
+ 			strm position: strm position - 1.
+ 			self assert: 'XXXXXXXXXX' equals: strm contents.
+ 		].
+ 	self assert: 10 equals: s size.
+ 	self assert: 'XXXXXXXXXX' equals: s.
+ 	
+ 	!



More information about the Squeak-dev mailing list