This test is failing in Trunk. A possibile fix is adding:
ReadWriteStream>>on: aCollection
super on: aCollection. readLimit := aCollection size.
So Long, -Tobias
Am 2011-05-23 um 11:50 schrieb commits@source.squeak.org:
A new version of CollectionsTests was added to project The Inbox: http://source.squeak.org/inbox/CollectionsTests-topa.185.mcz
==================== Summary ====================
Name: CollectionsTests-topa.185 Author: topa Time: 23 May 2011, 1:50:29.396 pm UUID: 8e536e32-1fb9-4bdd-8d4b-3088b46e41a9 Ancestors: CollectionsTests-nice.184
Mall testcase for RWBinaryOrTextStream on exisiting collections.
=============== Diff against CollectionsTests-nice.184 ===============
Item was added:
- ----- Method: RWBinaryOrTextStreamTest>>testExisiting (in category 'tests') -----
- testExisiting
- | string stream |
- string := 'hello'.
- stream := RWBinaryOrTextStream on: string.
- self assert: stream contents = string.
- stream := RWBinaryOrTextStream on: string.
- stream setToEnd.
- self assert: stream position = string size.
- !
Am 2011-05-23 um 13:56 schrieb Tobias Pape:
Am 2011-05-23 um 11:50 schrieb commits@source.squeak.org:
A new version of CollectionsTests was added to project The Inbox: http://source.squeak.org/inbox/CollectionsTests-topa.185.mcz
==================== Summary ====================
Name: CollectionsTests-topa.185 Author: topa Time: 23 May 2011, 1:50:29.396 pm UUID: 8e536e32-1fb9-4bdd-8d4b-3088b46e41a9 Ancestors: CollectionsTests-nice.184
Mall testcase for RWBinaryOrTextStream on exisiting collections.
=============== Diff against CollectionsTests-nice.184 ===============
Item was added:
- ----- Method: RWBinaryOrTextStreamTest>>testExisiting (in category 'tests') -----
- testExisiting
- | string stream |
- string := 'hello'.
- stream := RWBinaryOrTextStream on: string.
- self assert: stream contents = string.
Btw: is that actually the right pattern for readWrite streams with pre-filled content? or should I do things like that in another way?
- stream := RWBinaryOrTextStream on: string.
- stream setToEnd.
- self assert: stream position = string size.
- !
Best -Tobias
On 24.05.2011, at 11:55, Tobias Pape wrote:
Am 2011-05-23 um 13:56 schrieb Tobias Pape:
Am 2011-05-23 um 11:50 schrieb commits@source.squeak.org:
A new version of CollectionsTests was added to project The Inbox: http://source.squeak.org/inbox/CollectionsTests-topa.185.mcz
==================== Summary ====================
Name: CollectionsTests-topa.185 Author: topa Time: 23 May 2011, 1:50:29.396 pm UUID: 8e536e32-1fb9-4bdd-8d4b-3088b46e41a9 Ancestors: CollectionsTests-nice.184
Mall testcase for RWBinaryOrTextStream on exisiting collections.
=============== Diff against CollectionsTests-nice.184 ===============
Item was added:
- ----- Method: RWBinaryOrTextStreamTest>>testExisiting (in category 'tests') -----
- testExisiting
- | string stream |
- string := 'hello'.
- stream := RWBinaryOrTextStream on: string.
- self assert: stream contents = string.
Btw: is that actually the right pattern for readWrite streams with pre-filled content? or should I do things like that in another way?
Looks right. Though you should drop one i from the test selector ;)
- Bert -
- stream := RWBinaryOrTextStream on: string.
- stream setToEnd.
- self assert: stream position = string size.
- !
Best -Tobias
On Tue, 24 May 2011, Tobias Pape wrote:
Am 2011-05-23 um 13:56 schrieb Tobias Pape:
Am 2011-05-23 um 11:50 schrieb commits@source.squeak.org:
A new version of CollectionsTests was added to project The Inbox: http://source.squeak.org/inbox/CollectionsTests-topa.185.mcz
==================== Summary ====================
Name: CollectionsTests-topa.185 Author: topa Time: 23 May 2011, 1:50:29.396 pm UUID: 8e536e32-1fb9-4bdd-8d4b-3088b46e41a9 Ancestors: CollectionsTests-nice.184
Mall testcase for RWBinaryOrTextStream on exisiting collections.
=============== Diff against CollectionsTests-nice.184 ===============
Item was added:
- ----- Method: RWBinaryOrTextStreamTest>>testExisiting (in category 'tests') -----
- testExisiting
- | string stream |
- string := 'hello'.
- stream := RWBinaryOrTextStream on: string.
- self assert: stream contents = string.
Btw: is that actually the right pattern for readWrite streams with pre-filled content? or should I do things like that in another way?
Your assumption looks right. I'd expect
ReadWriteStream on: aString
to behave just like
ReadWriteStream on: aString from: 1 to: aString size
Levente
- stream := RWBinaryOrTextStream on: string.
- stream setToEnd.
- self assert: stream position = string size.
- !
Best -Tobias
Am 2011-05-24 um 18:35 schrieb Levente Uzonyi:
On Tue, 24 May 2011, Tobias Pape wrote:
=============== Diff against CollectionsTests-nice.184 ===============
[…] Btw: is that actually the right pattern for readWrite streams with pre-filled content? or should I do things like that in another way?
Your assumption looks right. I'd expect
ReadWriteStream on: aString
to behave just like
ReadWriteStream on: aString from: 1 to: aString size
Levente
So, what would be the correct fix? the one in my previous mail or is that the wrong place?
Best -Tobias
On Tue, 24 May 2011, Tobias Pape wrote:
Am 2011-05-24 um 18:35 schrieb Levente Uzonyi:
On Tue, 24 May 2011, Tobias Pape wrote:
=============== Diff against CollectionsTests-nice.184 ===============
[?] Btw: is that actually the right pattern for readWrite streams with pre-filled content? or should I do things like that in another way?
Your assumption looks right. I'd expect
ReadWriteStream on: aString
to behave just like
ReadWriteStream on: aString from: 1 to: aString size
Levente
So, what would be the correct fix? the one in my previous mail or is that the wrong place?
Either your version, or something like:
self on: aCollection from: 1 to: aCollection size
Levente
Best -Tobias
On Wed, 25 May 2011, Levente Uzonyi wrote:
On Tue, 24 May 2011, Tobias Pape wrote:
Am 2011-05-24 um 18:35 schrieb Levente Uzonyi:
On Tue, 24 May 2011, Tobias Pape wrote:
=============== Diff against CollectionsTests-nice.184 ===============
[?] Btw: is that actually the right pattern for readWrite streams with pre-filled content? or should I do things like that in another way?
Your assumption looks right. I'd expect
ReadWriteStream on: aString
to behave just like
ReadWriteStream on: aString from: 1 to: aString size
Levente
So, what would be the correct fix? the one in my previous mail or is that the wrong place?
Either your version, or something like:
self on: aCollection from: 1 to: aCollection size
I tried your fix, but it breaks Base64MimeConveter, so we should fix that before fixing this bug.
Levente
Levente
Best -Tobias
squeak-dev@lists.squeakfoundation.org