[m-dev.] diff: fix line numbers for exception test cases

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Jan 8 14:27:36 AEDT 2001


On 08-Jan-2001, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 07-Jan-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > tests/debugger/declarative/Mmakefile:
> > tests/debugger/declarative/throw.exp2:
> > tests/hard_coded/exceptions/Mmakefile:
> > tests/hard_coded/exceptions/test_uncaught_exception.exp2:
> > tests/hard_coded/Mmakefile:
> > tests/hard_coded/no_fully_strict.exp2:
> > tests/tabling/Mmakefile:
> > tests/tabling/loopcheck.exp2:
> > 	Pipe the output of these test cases through sed to avoid
> > 	hard-coding dependencies on line numbers in the standard
> > 	library.  These test cases were all failing because the
> > 	line numbers were changed by trd's recent change to add
> > 	code for the .NET back-end to the standard library.
> 
> I think there is a better solution. For the debugger test cases, we should
> simply modify the input script to turn off the printing of contexts with the
> command "context none". To handle the test cases where we get exceptions
> thrown, we should modify the code that prints the stack dump to check whether
> a specific environment variable has a specific value, and if yes, simply
> suppress the stack dump; the runtest scripts can them simply set up the
> environment variable.

Why is that solution better?

I think it's better if the tests are testing the same code that gets
used "in the field".  Otherwise, if e.g. stack dumps stop working,
we won't know about it.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list