Hi list,
http://code.google.com/p/pharo/issues/detail?id=2508&can=4&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty The following mini unit test fails: readWriteStreamShouldHonorStartIndex self assert: ( (ReadWriteStream on: 'hallo' from: 3 to: 4) contents = 'll') Instead, contents returns 'hall' Pharo image:core Pharo core version: PharoCore1.1ALPHA, Latest update: #11383 Virtual machine used: pharo-vm-osx Steps to reproduce: 1. Subclass TestCase and add the above method 2. run the test Cheers, Niko -- http://scg.unibe.ch/staff/Schwarz twitter.com/nes1983 Tel: +41 076 235 8683 _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On 05.06.2010 15:30, Niko Schwarz wrote:
Well, this is more an issue with contents, which returns the entire collection up to readLimit. (or position if it's a WriteStream)Hi list, http://code.google.com/p/pharo/issues/detail?id=2508&can=4&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty The following mini unit test fails: readWriteStreamShouldHonorStartIndex self assert: ( (ReadWriteStream on: 'hallo' from: 3 to: 4) contents = 'll') Instead, contents returns 'hall' Pharo image:core Pharo core version: PharoCore1.1ALPHA, Latest update: #11383 Virtual machine used: pharo-vm-osx Steps to reproduce: 1. Subclass TestCase and add the above method 2. run the test Cheers, Niko From the ANSI standard: "content returns a collection that contains the receiver's _past_ and future sequence values, in order". The method which behaves as you expect, is called upToEnd. Cheers, Henry _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
I got confused about this because of what printString shows. At least
printString could show what is intended to be in the stream, not more. Niko 2010/6/11 Henrik Sperre Johansen <[hidden email]>: > On 05.06.2010 15:30, Niko Schwarz wrote: > > Hi list, > > http://code.google.com/p/pharo/issues/detail?id=2508&can=4&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty > > The following mini unit test fails: > > readWriteStreamShouldHonorStartIndex > self assert: ( (ReadWriteStream on: 'hallo' from: 3 to: 4) contents = > 'll') > > Instead, contents returns 'hall' > > > Pharo image:core > Pharo core version: PharoCore1.1ALPHA, Latest update: #11383 > Virtual machine used: pharo-vm-osx > > Steps to reproduce: > 1. Subclass TestCase and add the above method > 2. run the test > > Cheers, > > Niko > > Well, this is more an issue with contents, which returns the entire > collection up to readLimit. (or position if it's a WriteStream) > From the ANSI standard: > "content returns a collection that contains the receiver's _past_ and future > sequence values, in order". > The method which behaves as you expect, is called upToEnd. > > Cheers, Henry > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- http://scg.unibe.ch/staff/Schwarz twitter.com/nes1983 Tel: +41 076 235 8683 _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |