The Trunk: CollectionsTests-pre.272.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-pre.272.mcz

commits-2
Patrick Rein uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-pre.272.mcz

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

Name: CollectionsTests-pre.272
Author: pre
Time: 21 December 2016, 2:44:36.561014 pm
UUID: 228aa803-a8b5-304c-b759-28f424a0191c
Ancestors: CollectionsTests-topa.271

Moves the failing test for WriteStreams to the expected failures as it does not test any previous implementation but is a feature request.
Also fixes a typo in the selector.

=============== Diff against CollectionsTests-topa.271 ===============

Item was added:
+ ----- Method: WriteStreamTest>>expectedFailures (in category 'tests - character writing') -----
+ expectedFailures
+
+ ^ #( testStreamAlwaysUseGivenCollection )!

Item was removed:
- ----- 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)).!

Item was added:
+ ----- Method: WriteStreamTest>>testStreamAlwaysUseGivenCollection (in category 'tests - instance creation') -----
+ testStreamAlwaysUseGivenCollection
+ "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."
+
+ "To implement this WriteStream>>#nextPut: might want to use becomeForward for replacing the original
+ string with the new widestring object. Another option might be to throw an exception --pre"
+
+ |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)).!