[m-rev.] For review: test case for memoed predicates with no outputs

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Oct 16 14:33:37 AEST 2006


On 16-Oct-2006, Zoltan Somogyi <zs at csse.unimelb.edu.au> wrote:
> On 16-Oct-2006, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> > +main(!IO) :-
> > +    ( if 
> > +        p(1, 1),
> > +        p(2, 2),
> > +        p(3, 3)
> > +      then
> > +        io.write_string("aye\n", !IO)
> > +      else
> > +        io.write_string("nay\n", !IO)
> > +    ).
> 
> That only tests for success. You also need a nested if-then-else to test for
> failure.

I also forgot the obvious: this test case doesn't actually test table lookups;
because no call is made twice, it only tests table insertions.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list