[m-rev.] trivial diff: re-enable test case, but without contexts

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Fri May 4 03:26:42 AEST 2001


Mark Anthony BROWN writes:
> 
> Estimated hours taken: 0.5
> Branches: main
> 
> The test case tests/debugger/declarative/output_term_dep was disabled
> because mdb was reporting incorrect line numbers when the option
> '--opt-space' was given.  This change improves the testing a bit.
> 
> tests/debugger/declarative/Mmakefile:
> tests/debugger/declarative/output_term_dep.exp:
> tests/debugger/declarative/output_term_dep.exp2:
> tests/debugger/declarative/output_term_dep.inp:
> 	Enable this test case, but add a 'context none' command so that
> 	line numbers don't affect the output.
> 
> tests/debugger/Mmakefile:
> tests/debugger/output_term_dep.exp:
> tests/debugger/output_term_dep.exp2:
> tests/debugger/output_term_dep.inp:
> tests/debugger/output_term_dep.m:
> 	Perform a similar test here (without the 'context none'), since it
> 	exposes a bug in mdb.  This test is currently disabled.
> 
> Index: tests/debugger/Mmakefile
> ===================================================================
> RCS file: /home/mercury1/repository/tests/debugger/Mmakefile,v
> retrieving revision 1.48
> diff -u -r1.48 Mmakefile
> --- tests/debugger/Mmakefile	2000/12/18 07:43:01	1.48
> +++ tests/debugger/Mmakefile	2001/05/03 07:06:11
> @@ -40,6 +40,10 @@
>  	shallow				\
>  	tabled_read
>  
> +# mdb reports incorrect line numbers when the following test is compiled
> +# with --opt-space
> +#	output_term_dep
> +
>  # The following tests are disabled, since currently they get some spurious
>  # failures if readline support is enabled:
>  #	interactive
> @@ -196,6 +200,10 @@
>  multi_parameter.out: multi_parameter multi_parameter.inp
>  	$(MDB) ./multi_parameter < multi_parameter.inp 2>&1 | \
>  		sed 's/char.m:[0-9]*/char.m:NNNN/g' > multi_parameter.out
> +
> +output_term_dep.out: output_term_dep output_term_dep.inp
> +	$(MDB) ./output_term_dep < output_term_dep.inp \
> +		> output_term_dep.out 2>&1
>  

Actually, that's not the right rule.  I'll commit the following:

Estimated hours taken: 0.1
Branches: main

tests/debugger/Mmakefile:
tests/debugger/output_term_dep.exp2:
	Pipe the output of this test through sed to remove any
	dependency on the standard library.

Index: tests/debugger/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/Mmakefile,v
retrieving revision 1.49
diff -u -r1.49 Mmakefile
--- tests/debugger/Mmakefile	2001/05/03 07:25:57	1.49
+++ tests/debugger/Mmakefile	2001/05/03 17:14:36
@@ -201,9 +201,11 @@
 	$(MDB) ./multi_parameter < multi_parameter.inp 2>&1 | \
 		sed 's/char.m:[0-9]*/char.m:NNNN/g' > multi_parameter.out
 
+# We need to pipe the output through sed to avoid hard-coding dependencies on
+# particular line numbers in the standard library source code.
 output_term_dep.out: output_term_dep output_term_dep.inp
-	$(MDB) ./output_term_dep < output_term_dep.inp \
-		> output_term_dep.out 2>&1
+	$(MDB) ./output_term_dep < output_term_dep.inp 2>&1 | \
+		sed 's/io.m:[0-9]*/io.m:NNNN/g' > output_term_dep.out 2>&1
 
 queens.out: queens queens.inp
 	$(MDB) ./queens < queens.inp > queens.out 2>&1
Index: tests/debugger/output_term_dep.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/output_term_dep.exp2,v
retrieving revision 1.1
diff -u -r1.1 output_term_dep.exp2
--- tests/debugger/output_term_dep.exp2	2001/05/03 07:25:57	1.1
+++ tests/debugger/output_term_dep.exp2	2001/05/03 15:28:07
@@ -13,21 +13,21 @@
        8:      6  4 CALL pred output_term_dep:pc/1-0 (det) output_term_dep.m:52 (output_term_dep.m:37)
        9:      6  4 EXIT pred output_term_dep:pc/1-0 (det) output_term_dep.m:52 (output_term_dep.m:37)
       10:      3  3 EXIT pred output_term_dep:p/3-0 (det) output_term_dep.m:34 (output_term_dep.m:23)
-      11:      7  3 CALL pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:24)
-5      12:      7  3 EXIT pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:24)
-      13:      8  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:25)
-
-      14:      8  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:25)
-      15:      9  3 CALL pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:26)
-8      16:      9  3 EXIT pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:26)
-      17:     10  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:27)
-
-      18:     10  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:27)
-      19:     11  3 CALL pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:28)
-13      20:     11  3 EXIT pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:28)
-      21:     12  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:29)
+      11:      7  3 CALL pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:24)
+5      12:      7  3 EXIT pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:24)
+      13:      8  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:25)
+
+      14:      8  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:25)
+      15:      9  3 CALL pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:26)
+8      16:      9  3 EXIT pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:26)
+      17:     10  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:27)
+
+      18:     10  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:27)
+      19:     11  3 CALL pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:28)
+13      20:     11  3 EXIT pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:28)
+      21:     12  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:29)
 
-      22:     12  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:29)
+      22:     12  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:29)
       23:      2  2 EXIT pred output_term_dep:test1/2-0 (det) output_term_dep.m:22 (output_term_dep.m:13)
       24:     13  2 CALL pred output_term_dep:test2/2-0 (det) output_term_dep.m:57 (output_term_dep.m:14)
       25:     14  3 CALL pred output_term_dep:q/1-0 (det) output_term_dep.m:65 (output_term_dep.m:58)
@@ -38,21 +38,21 @@
       30:     17  4 CALL pred output_term_dep:qc/1-0 (det) output_term_dep.m:83 (output_term_dep.m:68)
       31:     17  4 EXIT pred output_term_dep:qc/1-0 (det) output_term_dep.m:83 (output_term_dep.m:68)
       32:     14  3 EXIT pred output_term_dep:q/1-0 (det) output_term_dep.m:65 (output_term_dep.m:58)
-      33:     18  3 CALL pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:59)
-[[1, 2, 3], [], [99]]      34:     18  3 EXIT pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:59)
-      35:     19  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:60)
+      33:     18  3 CALL pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:59)
+[[1, 2, 3], [], [99]]      34:     18  3 EXIT pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:59)
+      35:     19  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:60)
 
-      36:     19  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:60)
+      36:     19  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:60)
       37:     13  2 EXIT pred output_term_dep:test2/2-0 (det) output_term_dep.m:57 (output_term_dep.m:14)
       38:     20  2 CALL pred output_term_dep:test3/2-0 (det) output_term_dep.m:88 (output_term_dep.m:15)
       39:     21  3 CALL pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:89)
       40:     21  3 THEN pred output_term_dep:r/2-0 (det) t; output_term_dep.m:109
       41:     21  3 EXIT pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:89)
-      42:     22  3 CALL pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:90)
-999      43:     22  3 EXIT pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:90)
-      44:     23  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:91)
+      42:     22  3 CALL pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:90)
+999      43:     22  3 EXIT pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:90)
+      44:     23  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:91)
 
-      45:     23  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:91)
+      45:     23  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:91)
       46:     24  3 CALL pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:92)
       47:     24  3 ELSE pred output_term_dep:r/2-0 (det) e; output_term_dep.m:120
       48:     25  4 CALL pred output_term_dep:ra/1-0 (semidet) output_term_dep.m:127 (output_term_dep.m:111)
@@ -63,11 +63,11 @@
       53:     26  4 FAIL pred output_term_dep:rb/1-0 (semidet) output_term_dep.m:133 (output_term_dep.m:114)
       54:     24  3 ELSE pred output_term_dep:r/2-0 (det) e;t;e; output_term_dep.m:118
       55:     24  3 EXIT pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:92)
-      56:     27  3 CALL pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:93)
-43      57:     27  3 EXIT pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:93)
-      58:     28  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:94)
+      56:     27  3 CALL pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:93)
+43      57:     27  3 EXIT pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:93)
+      58:     28  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:94)
 
-      59:     28  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:94)
+      59:     28  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:94)
       60:     29  3 CALL pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:95)
       61:     29  3 ELSE pred output_term_dep:r/2-0 (det) e; output_term_dep.m:120
       62:     30  4 CALL pred output_term_dep:ra/1-0 (semidet) output_term_dep.m:127 (output_term_dep.m:111)
@@ -80,11 +80,11 @@
       69:     32  4 CALL pred output_term_dep:rc/1-0 (det) output_term_dep.m:138 (output_term_dep.m:116)
       70:     32  4 EXIT pred output_term_dep:rc/1-0 (det) output_term_dep.m:138 (output_term_dep.m:116)
       71:     29  3 EXIT pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:95)
-      72:     33  3 CALL pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:96)
-57      73:     33  3 EXIT pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:96)
-      74:     34  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:97)
+      72:     33  3 CALL pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:96)
+57      73:     33  3 EXIT pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:96)
+      74:     34  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:97)
 
-      75:     34  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:97)
+      75:     34  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:97)
       76:     35  3 CALL pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:98)
       77:     35  3 ELSE pred output_term_dep:r/2-0 (det) e; output_term_dep.m:120
       78:     36  4 CALL pred output_term_dep:ra/1-0 (semidet) output_term_dep.m:127 (output_term_dep.m:111)
@@ -93,11 +93,11 @@
       81:     37  4 CALL pred output_term_dep:rd/1-0 (det) output_term_dep.m:143 (output_term_dep.m:121)
       82:     37  4 EXIT pred output_term_dep:rd/1-0 (det) output_term_dep.m:143 (output_term_dep.m:121)
       83:     35  3 EXIT pred output_term_dep:r/2-0 (det) output_term_dep.m:110 (output_term_dep.m:98)
-      84:     38  3 CALL pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:99)
--1      85:     38  3 EXIT pred io:write/3-0 (det) io.m:2024 (output_term_dep.m:99)
-      86:     39  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:100)
+      84:     38  3 CALL pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:99)
+-1      85:     38  3 EXIT pred io:write/3-0 (det) io.m:NNNN (output_term_dep.m:99)
+      86:     39  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:100)
 
-      87:     39  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:100)
+      87:     39  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:100)
       88:     20  2 EXIT pred output_term_dep:test3/2-0 (det) output_term_dep.m:88 (output_term_dep.m:15)
       89:     40  2 CALL pred output_term_dep:test4/2-0 (det) output_term_dep.m:148 (output_term_dep.m:16)
       90:     41  3 CALL pred output_term_dep:s/3-0 (nondet) output_term_dep.m:169 (output_term_dep.m:150)
@@ -138,9 +138,9 @@
      125:     41  3 REDO pred output_term_dep:s/3-0 (nondet) output_term_dep.m:169 (output_term_dep.m:150)
      126:     41  3 FAIL pred output_term_dep:s/3-0 (nondet) output_term_dep.m:169 (output_term_dep.m:150)
      127:     40  2 ELSE pred output_term_dep:test4/2-0 (det) c1;e; output_term_dep.m:155
-     128:     52  3 CALL pred io:write_string/3-0 (det) io.m:3544 (output_term_dep.m:155)
+     128:     52  3 CALL pred io:write_string/3-0 (det) io.m:NNNN (output_term_dep.m:155)
 no
-     129:     52  3 EXIT pred io:write_string/3-0 (det) io.m:3544 (output_term_dep.m:155)
+     129:     52  3 EXIT pred io:write_string/3-0 (det) io.m:NNNN (output_term_dep.m:155)
      130:     53  3 CALL pred output_term_dep:s/3-0 (nondet) output_term_dep.m:169 (output_term_dep.m:158)
      131:     53  3 SWTC pred output_term_dep:s/3-0 (nondet) s2; output_term_dep.m:184
      132:     53  3 DISJ pred output_term_dep:s/3-0 (nondet) s2;d1; output_term_dep.m:182
@@ -163,9 +163,9 @@
      149:     53  3 REDO pred output_term_dep:s/3-0 (nondet) output_term_dep.m:169 (output_term_dep.m:158)
      150:     53  3 FAIL pred output_term_dep:s/3-0 (nondet) output_term_dep.m:169 (output_term_dep.m:158)
      151:     40  2 ELSE pred output_term_dep:test4/2-0 (det) c2;e; output_term_dep.m:163
-     152:     60  3 CALL pred io:write_string/3-0 (det) io.m:3544 (output_term_dep.m:163)
+     152:     60  3 CALL pred io:write_string/3-0 (det) io.m:NNNN (output_term_dep.m:163)
 no
-     153:     60  3 EXIT pred io:write_string/3-0 (det) io.m:3544 (output_term_dep.m:163)
+     153:     60  3 EXIT pred io:write_string/3-0 (det) io.m:NNNN (output_term_dep.m:163)
      154:     40  2 EXIT pred output_term_dep:test4/2-0 (det) output_term_dep.m:148 (output_term_dep.m:16)
      155:     61  2 CALL pred output_term_dep:test5/2-0 (det) output_term_dep.m:218 (output_term_dep.m:17)
      156:     62  3 CALL pred output_term_dep:t/2-0 (semidet) output_term_dep.m:225 (output_term_dep.m:214)
@@ -177,10 +177,10 @@
      162:     65  4 FAIL pred output_term_dep:tc/1-0 (semidet) output_term_dep.m:243 (output_term_dep.m:228)
      163:     62  3 EXIT pred output_term_dep:t/2-0 (semidet) output_term_dep.m:225 (output_term_dep.m:214)
      164:     61  2 THEN pred output_term_dep:test5/2-0 (det) t; output_term_dep.m:216
-     165:     66  3 CALL pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:216)
-77     166:     66  3 EXIT pred io:write_int/3-0 (det) io.m:3565 (output_term_dep.m:216)
-     167:     67  3 CALL pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:217)
+     165:     66  3 CALL pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:216)
+77     166:     66  3 EXIT pred io:write_int/3-0 (det) io.m:NNNN (output_term_dep.m:216)
+     167:     67  3 CALL pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:217)
 
-     168:     67  3 EXIT pred io:nl/2-0 (det) io.m:1931 (output_term_dep.m:217)
+     168:     67  3 EXIT pred io:nl/2-0 (det) io.m:NNNN (output_term_dep.m:217)
      169:     61  2 EXIT pred output_term_dep:test5/2-0 (det) output_term_dep.m:218 (output_term_dep.m:17)
      170:      1  1 EXIT pred output_term_dep:main/2-0 (det) output_term_dep.m:9
--------------------------------------------------------------------------
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