Stream test cases

"Márton Sasvári (IJ/ETH)" Marton.Sasvari at ericsson.com
Fri Jan 13 04:15:54 PST 2006


Tony Garnock-Jones wrote:

> Hi all,
> 
> This is a call for participation around a test suite exercising the
> generic stream protocols.
> 
> It's a big job writing a comprehensive test suite that lines up with the
> description in the manual and the intent behind the protocols, but
> fortunately it's the kind of thing that parallelises nicely and can be
> built up piece by piece. If anyone has a spare moment, writing a test
> case for streams (or two) would be a good way of spending it!
> 
> There's the start of such a test suite in tests/stream.slate.
> 
> The reason for my interest in conformance to the stream protocols is
> that I've been hacking around sockets and socket-streams and threading
> recently, and I feel that getting sockets right needs the underlying
> stream implementation(s) to be aligned with the spec. Streams are so
> central to the operation of the system that they really need to be reliable.
> 
> Tony

Hi,

This is an old request but I've looked into it the last weekend 
(procrastinating moving the JSON parser to Unicode I guess) getting to 
the question:
were you thinking about reading up the manual and creating appropriate 
test cases or did you have something more specific parts in mind ?

I looked into steam.slate and the next few methods after the ones you 
created the startig test all are connected to the idiom that streams 
return Nil when exhausted. I remember reading a conversation on irc 
about the correctnes of this, and when providing test cases for this 
method they can serve no more than a documentation purpose if this will 
be changed. (Well it is strange that '{1. Nil. a} reader' eshausts quite 
early.). But they could be changed easily later if that was the assumed 
purpose for them.

Regards,
Marton






More information about the Slate mailing list