diff: io__read_line_as_string (second round)

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Feb 13 17:55:07 AEDT 1998


On 13-Feb-1998, Andrew Bromage <bromage at cs.mu.OZ.AU> wrote:
> > I think you should add a test case to test reading of long lines.
> 
> I think a more appropriate solution would be to add a large comment
> to this code to say, "Before changing this, test large lines", and
> note that an appropriate way to do this might be to reduce the default
> buffer size to something like 16 and reading some normal text files.

I think it is better to test the code as it will be run --
it might fail only for larger buffer sizes (e.g. because
the large buffer on the C stack interacts badly with our
non-local gotos, perhaps.)
And a test case in the regression test suite is a more reliable
way of ensuring that things work than comments in the source code.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list