[BUG] ReadStream>>isEmpty ?
Ken Causey
ken at kencausey.com
Fri Aug 8 18:06:33 UTC 2003
Well, I nearly threw up at the site of ReadStream>>on:from:to: . Maybe
my instincts are simply tuned wrongly. I'll think I'll leave well
enough alone for now.
Ken
On Fri, 2003-08-08 at 12:44, Andreas Raab wrote:
> > As a followup, redefining PositionableStream>>isEmpty to collection
> > isEmpty breaks quite a few things including the use of
> > backspace in most text panes and selecting from the stack list
> > in the debugger.
>
> Not surprising. Consider this test:
>
> testReadStreamEmpty
> | rs |
> rs := ReadStream on: #(1 2 3) from: 0 to: 0.
> self assert: (rs isEmpty).
> self assert: (rs next isNil).
>
> The collection isn't really what you want to look at.
>
> I recommend you write down your expectations in the form of tests first
> (like in the above) and go from there.
>
> Cheers,
> - Andreas
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030808/b7b3a15f/attachment.pgp
More information about the Squeak-dev
mailing list
|