[m-rev.] diff: missing test case

Mark Brown dougl at cs.mu.OZ.AU
Mon Nov 4 11:58:10 AEDT 2002


Estimated hours taken: 0.2
Branches: main

tests/debugger/declarative/Mmakefile:
tests/debugger/declarative/confirm_abort.exp:
tests/debugger/declarative/confirm_abort.inp:
tests/debugger/declarative/confirm_abort.m:
	A test case that covers various answers to the confirm bug
	question which are not covered by other tests.

Index: tests/debugger/declarative/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/Mmakefile,v
retrieving revision 1.51
diff -u -r1.51 Mmakefile
--- tests/debugger/declarative/Mmakefile	4 Nov 2002 00:50:10 -0000	1.51
+++ tests/debugger/declarative/Mmakefile	4 Nov 2002 00:51:04 -0000
@@ -13,6 +13,7 @@
 	browse_arg		\
 	catch			\
 	comp_gen		\
+	confirm_abort		\
 	deep_warning		\
 	dependency		\
 	dependency2		\
@@ -134,6 +135,9 @@
 
 comp_gen.out: comp_gen comp_gen.inp
 	$(MDB) ./comp_gen < comp_gen.inp > comp_gen.out 2>&1
+
+confirm_abort.out: confirm_abort confirm_abort.inp
+	$(MDB) ./confirm_abort < confirm_abort.inp > confirm_abort.out 2>&1
 
 deep_warning.out: deep_warning deep_warning.inp
 	$(MDB) ./deep_warning < deep_warning.inp > deep_warning.out 2>&1
Index: tests/debugger/declarative/confirm_abort.exp
===================================================================
RCS file: tests/debugger/declarative/confirm_abort.exp
diff -N tests/debugger/declarative/confirm_abort.exp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/declarative/confirm_abort.exp	3 Nov 2002 08:43:11 -0000
@@ -0,0 +1,54 @@
+       1:      1  1 CALL pred confirm_abort:main/2-0 (det) confirm_abort.m:7
+mdb> echo on
+Command echo enabled.
+mdb> register --quiet
+mdb> break p
+ 0: + stop  interface pred confirm_abort:p/1-0 (det)
+mdb> continue
+       2:      2  2 CALL pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8)
+mdb> finish
+       5:      2  2 EXIT pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8)
+mdb> dd
+p(27)
+Valid? no
+q(27)
+Valid? no
+Found incorrect contour:
+q(27)
+Is this a bug? help
+Answer one of:
+	y	yes		confirm that the suspect is a bug
+	n	no		do not accept that the suspect is a bug
+	a	abort		abort this diagnosis session and return to mdb
+	h, ?	help		this help message
+Found incorrect contour:
+q(27)
+Is this a bug? h
+Answer one of:
+	y	yes		confirm that the suspect is a bug
+	n	no		do not accept that the suspect is a bug
+	a	abort		abort this diagnosis session and return to mdb
+	h, ?	help		this help message
+Found incorrect contour:
+q(27)
+Is this a bug? ?
+Answer one of:
+	y	yes		confirm that the suspect is a bug
+	n	no		do not accept that the suspect is a bug
+	a	abort		abort this diagnosis session and return to mdb
+	h, ?	help		this help message
+Found incorrect contour:
+q(27)
+Is this a bug? abort
+       5:      2  2 EXIT pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8)
+mdb> dd
+Found incorrect contour:
+q(27)
+Is this a bug? a
+       5:      2  2 EXIT pred confirm_abort:p/1-0 (det) confirm_abort.m:15 (confirm_abort.m:8)
+mdb> dd
+Found incorrect contour:
+q(27)
+Is this a bug? y
+       4:      3  3 EXIT pred confirm_abort:q/1-0 (det) confirm_abort.m:19 (confirm_abort.m:15)
+mdb> quit -y
Index: tests/debugger/declarative/confirm_abort.inp
===================================================================
RCS file: tests/debugger/declarative/confirm_abort.inp
diff -N tests/debugger/declarative/confirm_abort.inp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/declarative/confirm_abort.inp	3 Nov 2002 08:42:59 -0000
@@ -0,0 +1,17 @@
+echo on
+register --quiet
+break p
+continue
+finish
+dd
+no
+no
+help
+h
+?
+abort
+dd
+a
+dd
+y
+quit -y
Index: tests/debugger/declarative/confirm_abort.m
===================================================================
RCS file: tests/debugger/declarative/confirm_abort.m
diff -N tests/debugger/declarative/confirm_abort.m
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/declarative/confirm_abort.m	3 Nov 2002 08:40:54 -0000
@@ -0,0 +1,20 @@
+:- module confirm_abort.
+:- interface.
+:- import_module io.
+:- pred main(io__state::di, io__state::uo) is det.
+:- implementation.
+
+main -->
+	{ p(X) },
+	io__write_int(X),
+	io__nl.
+
+:- pred p(int::out) is det.
+
+p(N) :-
+	q(N).
+
+:- pred q(int::out) is det.
+
+q(27).
+
--------------------------------------------------------------------------
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