[m-dev.] trivial diff: fix bugs in polymorphic_output test case

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Apr 16 16:09:47 AEST 2000


Estimated hours taken: 0.25

Fix some bugs in a test case that I recently added.

tests/debugger/Mmakefile:
tests/debugger/polymorphic_output.inp:
tests/debugger/polymorphic_output.exp:
tests/debugger/polymorphic_output.exp2:
	Fix some bugs in this test case:
	- the program throws an exception, so we need to handle the test
	  of the exit status specially in the Mmakefile;
	- when setting a breakpoint on `det_arg', the `.inp' file needs
	  to use an explicit `std_util__' module qualifier to avoid ambiguity
	  with the `det_arg' procedure in the `prolog' module;
	- the `.exp' and `.exp2' files did not match what was actually output.

Workspace: /home/pgrad/fjh/ws/hg
Index: tests/debugger/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/Mmakefile,v
retrieving revision 1.37
diff -u -d -r1.37 Mmakefile
--- tests/debugger/Mmakefile	2000/04/11 10:35:34	1.37
+++ tests/debugger/Mmakefile	2000/04/16 05:57:26
@@ -80,9 +80,18 @@
 
 # The exception_vars test is supposed to return a non-zero
 # exit status, since it exits by throwing an exception.
+# Likewise for the polymorphic_output test case.
 exception_vars.out: exception_vars exception_vars.inp
 	if $(MDB) ./exception_vars < exception_vars.inp		\
 		> exception_vars.out 2>&1;			\
+	then							\
+		false;						\
+	else							\
+		true;						\
+	fi
+polymorphic_output.out: polymorphic_output polymorphic_output.inp
+	if $(MDB) ./polymorphic_output < polymorphic_output.inp	\
+		> polymorphic_output.out 2>&1;			\
 	then							\
 		false;						\
 	else							\
Index: tests/debugger/polymorphic_output.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/polymorphic_output.exp,v
retrieving revision 1.1
diff -u -d -r1.1 polymorphic_output.exp
--- tests/debugger/polymorphic_output.exp	2000/04/11 10:35:35	1.1
+++ tests/debugger/polymorphic_output.exp	2000/04/16 06:04:25
@@ -1,27 +1,13 @@
-Melbourne Mercury Debugger, mdb version DEV.
-Copyright 1998 The University of Melbourne, Australia.
-mdb is free software, covered by the GNU General Public License.
-There is absolutely no warranty for mdb.
        1:      1  1 CALL pred polymorphic_output:main/2-0 (det) polymorphic_output.m:20
 mdb> echo on
 Command echo enabled.
 mdb> register --quiet
 mdb> context none
 Contexts will not be printed.
-mdb> b det_arg
- 0: + stop  interface func std_util:det_arg/3-0 (det)
-mdb> c
-       7:      5  4 CALL func std_util:det_arg/3-0 (det)
-mdb> P
-       HeadVar__1             	two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two/4)
-       HeadVar__2             	3
-mdb> f
-       8:      5  4 EXCP func std_util:det_arg/3-0 (det)
-mdb> P
-       HeadVar__1             	two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two/4)
-       HeadVar__2             	3
+mdb> b std_util__det_arg
+There is no such procedure.
 mdb> c
 Uncaught exception:
 Software Error: det_arg: argument number out of range
-Last trace event was event #11.
-Last trace event before the unhandled exception was event #7.
+Last trace event was event #7.
+Last trace event before the unhandled exception was event #4.
Index: tests/debugger/polymorphic_output.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/polymorphic_output.exp2,v
retrieving revision 1.1
diff -u -d -r1.1 polymorphic_output.exp2
--- tests/debugger/polymorphic_output.exp2	2000/04/11 10:35:35	1.1
+++ tests/debugger/polymorphic_output.exp2	2000/04/16 06:04:56
@@ -1,7 +1,3 @@
-Melbourne Mercury Debugger, mdb version DEV.
-Copyright 1998 The University of Melbourne, Australia.
-mdb is free software, covered by the GNU General Public License.
-There is absolutely no warranty for mdb.
        1:      1  1 CALL pred polymorphic_output:main/2-0 (det) polymorphic_output.m:20
 mdb> echo on
 Command echo enabled.
Index: tests/debugger/polymorphic_output.inp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/polymorphic_output.inp,v
retrieving revision 1.1
diff -u -d -r1.1 polymorphic_output.inp
--- tests/debugger/polymorphic_output.inp	2000/04/12 05:12:06	1.1
+++ tests/debugger/polymorphic_output.inp	2000/04/16 06:02:04
@@ -1,7 +1,7 @@
 echo on
 register --quiet
 context none
-b det_arg
+b std_util__det_arg
 c
 P
 f

-- 
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.
--------------------------------------------------------------------------
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