[m-rev.] trivial diff: fix failure of term_size_cells test case

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jan 13 19:13:03 AEDT 2009


tests/debugger/term_size_cells.{m,exp}:
 	Update this test case as per the recent change to the
 	.tsw version.

Julien.

Index: term_size_cells.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/term_size_cells.exp,v
retrieving revision 1.2
diff -u -r1.2 term_size_cells.exp
--- term_size_cells.exp	26 Jan 2005 13:52:44 -0000	1.2
+++ term_size_cells.exp	13 Jan 2009 08:11:05 -0000
@@ -1,4 +1,4 @@
-      E1:     C1 CALL pred term_size_cells.main/2-0 (det) term_size_cells.m:18
+      E1:     C1 CALL pred term_size_cells.main/2-0 (det) term_size_cells.m:23
  mdb> echo on
  Command echo enabled.
  mdb> register --quiet
@@ -27,10 +27,10 @@
  mdb> print *
         IntList (arg 1)        	[1, 2, 3]
         DoubleIntList (arg 2)  	[1, 2, 3, 1, 2, 3]
-       FloatList (arg 3)      	[1.00000000000000, 2.00000000000000, 3.00000000000000]
-       PairList (arg 4)       	[-(1, 1.00000000000000), -(2, 2.00000000000000), -(3, 3.00000000000000)]
+       FloatList (arg 3)      	[1.0, 2.0, 3.0]
+       PairList (arg 4)       	[1 - 1.0, 2 - 2.0, 3 - 3.0]
         UnivList (arg 5)       	[univ_cons(1), univ_cons(2), univ_cons(3)]
-       Univ (arg 6)           	univ_cons(node(node(leaf, 2, -/2, leaf), 1, -(1.00000000000000, "one"), leaf))
+       Univ (arg 6)           	univ_cons(node(node(leaf, 2, -/2, leaf), 1, -(1.0, "one"), leaf))
  mdb> term_size *
  IntList                   3
  DoubleIntList             6
@@ -43,7 +43,7 @@
  ["a", "bb", "ccc"]
  node(leaf, "one", 1, node(leaf, "two", 2, leaf))
  [1, 2, 3, 1, 2, 3]
-[1.00000000000000, 2.00000000000000, 3.00000000000000]
-[1 - 1.00000000000000, 2 - 2.00000000000000, 3 - 3.00000000000000]
+[1.0, 2.0, 3.0]
+[1 - 1.0, 2 - 2.0, 3 - 3.0]
  [univ_cons(1), univ_cons(2), univ_cons(3)]
-univ_cons(node(node(leaf, 2, 2.00000000000000 - "two", leaf), 1, 1.00000000000000 - "one", leaf))
+univ_cons(node(node(leaf, 2, 2.0 - "two", leaf), 1, 1.0 - "one", leaf))
Index: term_size_cells.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/term_size_cells.m,v
retrieving revision 1.1
diff -u -r1.1 term_size_cells.m
--- term_size_cells.m	20 Oct 2003 07:29:41 -0000	1.1
+++ term_size_cells.m	13 Jan 2009 08:10:06 -0000
@@ -1,62 +1,67 @@
+% vim: ts=4 sw=4 et ft=mercury
+
  :- module term_size_cells.

  :- interface.

  :- import_module io.

-:- pred main(io__state, io__state).
-:- mode main(di, uo) is det.
+:- pred main(io::di, io::uo) is det.

  :- implementation.

-:- import_module std_util, list, int, float.
+:- import_module float.
+:- import_module int.
+:- import_module list.
+:- import_module pair.
+:- import_module univ.

  :- type tree(K, V)
-	--->	leaf
-	;	node(tree(K, V), K, V, tree(K, V)).
+    --->    leaf
+    ;       node(tree(K, V), K, V, tree(K, V)).

  main(!IO) :-
-	static(IntList, StringList, Tree),
-	dynamic(IntList, DoubleIntList, FloatList, PairList, UnivList, Univ),
-	io__write(IntList, !IO),
-	io__nl(!IO),
-	io__write(StringList, !IO),
-	io__nl(!IO),
-	io__write(Tree, !IO),
-	io__nl(!IO),
-	io__write(DoubleIntList, !IO),
-	io__nl(!IO),
-	io__write(FloatList, !IO),
-	io__nl(!IO),
-	io__write(PairList, !IO),
-	io__nl(!IO),
-	io__write(UnivList, !IO),
-	io__nl(!IO),
-	io__write(Univ, !IO),
-	io__nl(!IO).
+    static(IntList, StringList, Tree),
+    dynamic(IntList, DoubleIntList, FloatList, PairList, UnivList, Univ),
+    io.write(IntList, !IO),
+    io.nl(!IO),
+    io.write(StringList, !IO),
+    io.nl(!IO),
+    io.write(Tree, !IO),
+    io.nl(!IO),
+    io.write(DoubleIntList, !IO),
+    io.nl(!IO),
+    io.write(FloatList, !IO),
+    io.nl(!IO),
+    io.write(PairList, !IO),
+    io.nl(!IO),
+    io.write(UnivList, !IO),
+    io.nl(!IO),
+    io.write(Univ, !IO),
+    io.nl(!IO).

  % Return some static terms.

  :- pred static(list(int)::out, list(string)::out, tree(string, int)::out)
-	is det.
+    is det.

  static(IntList, StringList, Tree) :-
-	IntList = [1,2,3],
-	StringList = ["a", "bb", "ccc"],
-	Tree = node(leaf, "one", 1, node(leaf, "two", 2, leaf)).
+    IntList = [1,2,3],
+    StringList = ["a", "bb", "ccc"],
+    Tree = node(leaf, "one", 1, node(leaf, "two", 2, leaf)).

  % Return some dynamic terms.

  :- pred dynamic(list(int)::in, list(int)::out, list(float)::out,
-	list(pair(int, float))::out, list(univ)::out, univ::out) is det.
+    list(pair(int, float))::out, list(univ)::out, univ::out) is det.

  dynamic(IntList, DoubleIntList, FloatList, PairList, UnivList, Univ) :-
-	list__append(IntList, IntList, DoubleIntList),
-	FloatList = list__map(float, IntList),
-	PairList = list__map(pair_float, IntList),
-	UnivList = list__map(convert_type_to_univ, IntList),
-	Univ = convert_type_to_univ(
-		node(node(leaf, 2, 2.0 - "two", leaf), 1, 1.0 - "one", leaf)).
+    list.append(IntList, IntList, DoubleIntList),
+    FloatList = list.map(float, IntList),
+    PairList = list.map(pair_float, IntList),
+    UnivList = list.map(convert_type_to_univ, IntList),
+    Univ = convert_type_to_univ(
+        node(node(leaf, 2, 2.0 - "two", leaf), 1, 1.0 - "one", leaf)).

  :- func pair_float(int) = pair(int, float).

@@ -65,4 +70,4 @@
  :- func convert_type_to_univ(T) = univ.

  convert_type_to_univ(T) = Univ :-
-	type_to_univ(T, Univ).
+    type_to_univ(T, Univ).

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