[m-rev.] trivial diff: fix failure of tests/debugger/interactive

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Oct 5 11:56:57 AEST 2006


Estimated hours taken: 0
Branches: main

Fix a failing test case.

tests/debugger/interactive.exp:
 	Conform to recent changes in the handling of error messages
 	and warnings.

Julien.

Index: interactive.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/interactive.exp,v
retrieving revision 1.15
diff -u -r1.15 interactive.exp
--- interactive.exp	16 Jun 2006 05:14:42 -0000	1.15
+++ interactive.exp	5 Oct 2006 01:54:04 -0000
@@ -3,7 +3,8 @@
  Command echo enabled.
  mdb> query interactive list
  ?- append(X, Y, ['a', 'b', 'c']).
-<stdin>:026: Inferred :- pred query((list.list(character)), (list.list(character))).
+<stdin>:026: Inferred :- pred query((list.list(character)),
+<stdin>:026:   (list.list(character))).
  <stdin>:026: Inferred :- mode query(out, out) is multi.
  X = [], Y = ['a', 'b', 'c'], true ;
  X = ['a'], Y = ['b', 'c'], true ;
@@ -23,18 +24,16 @@
  fail.
  No (more) solutions.
  ?- qperm([1,2,3], List), List = [2 | _].
-<stdin>:014: In clause for predicate `mdb_query.run/2':
-<stdin>:014:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `mdb_query.run/2':
-<stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `mdb_query.run/2':
+<stdin>:001: In clause for predicate `mdb_query.query'/2:
+<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
+<stdin>:012: In clause for predicate `mdb_query.run'/2:
  <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:015: In clause for predicate `mdb_query.run/2':
+<stdin>:014: In clause for predicate `mdb_query.run'/2:
+<stdin>:014:   warning: variable `_2' occurs more than once in this scope.
+<stdin>:015: In clause for predicate `mdb_query.run'/2:
  <stdin>:015:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:026: In clause for predicate `mdb_query.query/2':
+<stdin>:026: In clause for predicate `mdb_query.query'/2:
  <stdin>:026:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `mdb_query.query/2':
-<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
  <stdin>:026: Inferred :- pred query((list.list(int)), (list.list(int))).
  <stdin>:026: Inferred :- mode query(out, out) is nondet.
  List = [2, 1, 3], _2 = [1, 3], true ;
@@ -42,25 +41,23 @@
  fail.
  No (more) solutions.
  ?- qperm([1,2,3], List), List = [4 | _].
-<stdin>:014: In clause for predicate `mdb_query.run/2':
-<stdin>:014:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `mdb_query.run/2':
-<stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `mdb_query.run/2':
+<stdin>:001: In clause for predicate `mdb_query.query'/2:
+<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
+<stdin>:012: In clause for predicate `mdb_query.run'/2:
  <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:015: In clause for predicate `mdb_query.run/2':
+<stdin>:014: In clause for predicate `mdb_query.run'/2:
+<stdin>:014:   warning: variable `_2' occurs more than once in this scope.
+<stdin>:015: In clause for predicate `mdb_query.run'/2:
  <stdin>:015:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:026: In clause for predicate `mdb_query.query/2':
+<stdin>:026: In clause for predicate `mdb_query.query'/2:
  <stdin>:026:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `mdb_query.query/2':
-<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
  <stdin>:026: Inferred :- pred query((list.list(int)), (list.list(int))).
  <stdin>:026: Inferred :- mode query(out, out) is nondet.
  fail.
  No (more) solutions.
  ?- qperm([1,2,"foo"], List).
-<stdin>:001: In clause for predicate `mdb_query.query/1':
-<stdin>:001:   in argument 1 of call to predicate `qperm/2':
+<stdin>:001: In clause for predicate `query'/1:
+<stdin>:001:   in argument 1 of call to predicate `qperm'/2:
  <stdin>:001:   in argument 2 of functor `[|]/2':
  <stdin>:001:   in argument 2 of functor `[|]/2':
  <stdin>:001:   in argument 1 of functor `[|]/2':
@@ -73,13 +70,13 @@
  ?- qperm(List, [1]).
  <stdin>:026: Inferred :- pred query((list.list(int))).
  <stdin>:014: In clause for `run(di, uo)':
-<stdin>:014:   in call to predicate `mdb_query.query/1':
+<stdin>:014:   in call to predicate `mdb_query.query'/1:
  <stdin>:014:   mode error: arguments `List' have the following insts:
  <stdin>:014:     free
  <stdin>:014:   which does not match any of the valid modes for the callee,
  <stdin>:014:   because of the following error.
  <stdin>:026: In clause for `query(out(not_reached))':
-<stdin>:026:   in argument 1 of call to predicate `interactive.qperm/2':
+<stdin>:026:   in argument 1 of call to predicate `interactive.qperm'/2:
  <stdin>:026:   mode error: variable `HeadVar__2' has instantiatedness `free',
  <stdin>:026:   expected instantiatedness was `ground'.
  For more information, recompile with `-E'.
@@ -88,7 +85,8 @@

  mdb> cc_query interactive list
  ?- append(X, Y, ['a', 'b', 'c']).
-<stdin>:017: Inferred :- pred query((list.list(character)), (list.list(character))).
+<stdin>:017: Inferred :- pred query((list.list(character)),
+<stdin>:017:   (list.list(character))).
  <stdin>:017: Inferred :- mode query(out, out) is multi.
  X = [], Y = ['a', 'b', 'c'], true.
  ?- qperm([1,2,3], List).
@@ -96,26 +94,26 @@
  <stdin>:017: Inferred :- mode query(out) is nondet.
  List = [1, 2, 3], true.
  ?- qperm([1,2,3], List), List = [2 | _].
-<stdin>:011: In clause for predicate `mdb_query.run/2':
+<stdin>:001: In clause for predicate `mdb_query.query'/2:
+<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
+<stdin>:011: In clause for predicate `mdb_query.run'/2:
  <stdin>:011:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `mdb_query.run/2':
+<stdin>:012: In clause for predicate `mdb_query.run'/2:
  <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:017: In clause for predicate `mdb_query.query/2':
+<stdin>:017: In clause for predicate `mdb_query.query'/2:
  <stdin>:017:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `mdb_query.query/2':
-<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
  <stdin>:017: Inferred :- pred query((list.list(int)), (list.list(int))).
  <stdin>:017: Inferred :- mode query(out, out) is nondet.
  List = [2, 1, 3], _2 = [1, 3], true.
  ?- qperm([1,2,3], List), List = [4 | _].
-<stdin>:011: In clause for predicate `mdb_query.run/2':
+<stdin>:001: In clause for predicate `mdb_query.query'/2:
+<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
+<stdin>:011: In clause for predicate `mdb_query.run'/2:
  <stdin>:011:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `mdb_query.run/2':
+<stdin>:012: In clause for predicate `mdb_query.run'/2:
  <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:017: In clause for predicate `mdb_query.query/2':
+<stdin>:017: In clause for predicate `mdb_query.query'/2:
  <stdin>:017:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `mdb_query.query/2':
-<stdin>:001:   warning: variable `_2' occurs more than once in this scope.
  <stdin>:017: Inferred :- pred query((list.list(int)), (list.list(int))).
  <stdin>:017: Inferred :- mode query(out, out) is nondet.
  No solution.

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