[squeak-dev] The Trunk: CollectionsTests-topa.215.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Mar 25 13:27:58 UTC 2014
Tobias Pape uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-topa.215.mcz
==================== Summary ====================
Name: CollectionsTests-topa.215
Author: topa
Time: 25 March 2014, 2:27:43.108 pm
UUID: cb44512a-51f4-4cef-8d33-336b520e113f
Ancestors: CollectionsTests-dtl.214
When a stream is created on a collection, it tries to keep
using that collection instead of copying, even in the case
of mutation of the original collection.
=============== Diff against CollectionsTests-dtl.214 ===============
Item was added:
+ ----- Method: WriteStreamTest>>testStreamAlwasyUseGivenCollection (in category 'tests - instance creation') -----
+ testStreamAlwasyUseGivenCollection
+ "self debug: #testStreamUseGivenCollection"
+
+ "When a stream is created on a collection, it tries to keep using that collection instead of copying,
+ even in the case of mutation of the original collection."
+
+ |string stream|
+
+ string := String withAll: 'xy'.
+ stream := WriteStream on: string.
+
+ stream nextPut: $a.
+ stream nextPut: (Character codePoint: 269). "wide."
+ self assert: string = (String with: $a with: (Character codePoint: 269)).!
More information about the Squeak-dev
mailing list
|