[m-rev.] for review: add comprehensive string__format tests

Peter Ross pro at missioncriticalit.com
Wed Nov 13 02:22:36 AEDT 2002


On Tue, Nov 12, 2002 at 12:27:32PM +1100, Fergus Henderson wrote:
> On 11-Nov-2002, Peter Ross <peter.ross at miscrit.be> wrote:
> > Index: tests/general/string_format_c.exp
> > ===================================================================
> > RCS file: tests/general/string_format_c.exp
> > diff -N tests/general/string_format_c.exp
> > --- /dev/null	1 Jan 1970 00:00:00 -0000
> > +++ tests/general/string_format_c.exp	11 Nov 2002 19:45:21 -0000
> > @@ -0,0 +1,40 @@
> > +    % +-0c:a
> > +    % +-1c:a
> 
> Failures would be easier to debug if there was some character
> at the start and end of the result, so that trailing spaces
> show up more clearly.
> 
Done.

> > Index: tests/general/string_format_c.m
> ...
> > +main -->
> > +	{ Chars = [c('a')] },
> > +	list__foldl(output_list(Chars), format_strings("c")).
> 
> It may be worth also testing ' '.
> 
Done.

> > Index: tests/general/string_format_e.m
> > +main -->
> > +	{ Floats = [f(0.0), f(-1.0), f(1.0), f(10.0), f(-10.0),
> > +			f(100.0), f(-100.0), f(min), f(max)] },
> > +	list__foldl(output_list(Floats), format_strings("e")),
> > +	list__foldl(output_list(Floats), format_strings("E")).
> 
> It is also worth testing 
> 	- larger numbers which end in trailing zeros, e.g. 1.0E9
Done.

> 	- numbers which require rounding, e.g. +/- 5.555555555555555555555555

Done.

> 	- -min and -max
Done.

> 	- denormals, e.g. +/- min/2.0, 1.2345678 * min / 16.0, etc.
Done (added +/- min/2.0, +/- max*max)
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list