[BUG] ReadStream>>isEmpty ?
Andreas Raab
andreas.raab at gmx.de
Fri Aug 8 17:44:34 UTC 2003
> 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
More information about the Squeak-dev
mailing list
|