The Inbox: CollectionsTests-topa.185.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: CollectionsTests-topa.185.mcz

commits-2
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.
+ !


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: CollectionsTests-topa.185.mcz

Tobias Pape

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 [hidden email]:

> 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.
> + !
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: CollectionsTests-topa.185.mcz

Tobias Pape

Am 2011-05-23 um 13:56 schrieb Tobias Pape:

> Am 2011-05-23 um 11:50 schrieb [hidden email]:
>
>> 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


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: CollectionsTests-topa.185.mcz

Bert Freudenberg

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 [hidden email]:
>>
>>> 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
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: CollectionsTests-topa.185.mcz

Levente Uzonyi-2
In reply to this post by Tobias Pape
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 [hidden email]:
>>
>>> 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
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: CollectionsTests-topa.185.mcz

Tobias Pape-2

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
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: CollectionsTests-topa.185.mcz

Levente Uzonyi-2
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
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: CollectionsTests-topa.185.mcz

Levente Uzonyi-2
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
>>
>
>