diff: io__read_line_as_string (second round)

Tyson Dowd trd at stimpy.cs.mu.oz.au
Fri Feb 13 21:47:11 AEDT 1998


On 13-Feb-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 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.

I agree. A major reason why regression tests are better than comments
is that they will be run, and they will be run regardless of whether
someone sees (or takes heed of) the comments.




More information about the developers mailing list