[m-rev.] diff: fix output of debugger/declarative/sort test case

Ian MacLarty maclarty at cs.mu.OZ.AU
Wed Jul 6 12:44:15 AEST 2005


Estimated hours taken: 0.3
Branches: 0.12

Fix the output of the debugger/declarative/sort test case.  Stream identifiers
were being shown in the output, which are pretty much random numbers.
The solution was to hide them by setting the format size appropriately.

tests/debugger/declarative/sort.exp:
tests/debugger/declarative/sort.inp:
	Update the test output and input.

Index: tests/debugger/declarative//sort.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/sort.exp,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 sort.exp
--- tests/debugger/declarative//sort.exp	31 May 2005 08:48:07 -0000	1.1.2.2
+++ tests/debugger/declarative//sort.exp	6 Jul 2005 02:36:24 -0000
@@ -10,147 +10,62 @@
 ian
 ian
       E2:     C1 EXIT pred sort.main/2-0 (det) sort.m:27
-mdb> set format pretty
-mdb> set depth 1
+mdb> set format flat
+mdb> set size 1
 mdb> dd
-main(...)
-16 io actions:
-command_line_arguments(...)
-do_open_text(...)
-get_stream_db(...)
-set_stream_db(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
-Valid? set depth 10
 main(_, _)
 16 io actions:
 command_line_arguments(["sort.input"])
-do_open_text("sort.input", "r", 0, 0, <<foreign>>)
-get_stream_db(
-  map([150336788 -> stream(0, input, preopen, stdin),
-   150336796 -> stream(1, output, preopen, stdout),
-   150336820 -> stream(1, output, preopen, stderr)]))
-set_stream_db(
-  map([150336788 -> stream(0, input, preopen, stdin),
-   150336796 -> stream(1, output, preopen, stdout),
-   150336820 -> stream(1, output, preopen, stderr),
-   158215080 -> stream(0, input, text, file("sort.input"))]))
-read_line_as_string_2(<<foreign>>, yes, 0, "ian
-")
-read_line_as_string_2(<<foreign>>, yes, 0, "zoltan
-")
-read_line_as_string_2(<<foreign>>, yes, 0, "rafe
-")
-read_line_as_string_2(<<foreign>>, yes, 0, "julien
-")
-read_line_as_string_2(<<foreign>>, yes, -1, "")
-write_string("ian
-")
+do_open_text("sort.input", "r", 0, 0, stream(0, input, text, file("sort.input")))
+get_stream_db(four/10)
+set_stream_db(two/4)
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "ian\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "zoltan\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "rafe\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "julien\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, -1, "")
+write_string("ian\n")
 write_string("")
-write_string("ian
-")
+write_string("ian\n")
 write_string("")
-write_string("ian
-")
+write_string("ian\n")
 write_string("")
-write_string("ian
-")
+write_string("ian\n")
 Valid? print io 9
-read_line_as_string_2(<<foreign>>, yes, -1, "")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, -1, "")
 main(_, _)
 16 io actions:
 command_line_arguments(["sort.input"])
-do_open_text("sort.input", "r", 0, 0, <<foreign>>)
-get_stream_db(
-  map([150336788 -> stream(0, input, preopen, stdin),
-   150336796 -> stream(1, output, preopen, stdout),
-   150336820 -> stream(1, output, preopen, stderr)]))
-set_stream_db(
-  map([150336788 -> stream(0, input, preopen, stdin),
-   150336796 -> stream(1, output, preopen, stdout),
-   150336820 -> stream(1, output, preopen, stderr),
-   158215080 -> stream(0, input, text, file("sort.input"))]))
-read_line_as_string_2(<<foreign>>, yes, 0, "ian
-")
-read_line_as_string_2(<<foreign>>, yes, 0, "zoltan
-")
-read_line_as_string_2(<<foreign>>, yes, 0, "rafe
-")
-read_line_as_string_2(<<foreign>>, yes, 0, "julien
-")
-read_line_as_string_2(<<foreign>>, yes, -1, "")
-write_string("ian
-")
-write_string("")
-write_string("ian
-")
-write_string("")
-write_string("ian
-")
-write_string("")
-write_string("ian
-")
-Valid? set depth 1
-main(...)
-16 io actions:
-command_line_arguments(...)
-do_open_text(...)
-get_stream_db(...)
-set_stream_db(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
-write_string(...)
+do_open_text("sort.input", "r", 0, 0, stream(0, input, text, file("sort.input")))
+get_stream_db(four/10)
+set_stream_db(two/4)
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "ian\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "zoltan\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "rafe\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "julien\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, -1, "")
+write_string("ian\n")
+write_string("")
+write_string("ian\n")
+write_string("")
+write_string("ian\n")
+write_string("")
+write_string("ian\n")
 Valid? no
-open_stream(...)
+open_stream(["sort.input"], ok(stream(0, input, text, file("sort.input"))), _, _)
 3 io actions:
-do_open_text(...)
-get_stream_db(...)
-set_stream_db(...)
+do_open_text("sort.input", "r", 0, 0, stream(0, input, text, file("sort.input")))
+get_stream_db(four/10)
+set_stream_db(two/4)
 Valid? yes
-read_lines(...)
-5 io actions:
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-Valid? quit
-Unknown command, 'h' for help.
-read_lines(...)
-5 io actions:
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-Valid? quit -y
-Unknown command, 'h' for help.
-read_lines(...)
+read_lines(stream/4, [|]/2, _, _)
 5 io actions:
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-read_line_as_string_2(...)
-Valid? Diagnosis aborted.
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "ian\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "zoltan\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "rafe\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, 0, "julien\n")
+read_line_as_string_2(stream(0, input, text, file("sort.input")), yes, -1, "")
+Valid? a
+Diagnosis aborted.
       E2:     C1 EXIT pred sort.main/2-0 (det) sort.m:27
-mdb> mdb: are you sure you want to quit?
\ No newline at end of file
+mdb> quit -y
Index: tests/debugger/declarative//sort.inp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/sort.inp,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 sort.inp
--- tests/debugger/declarative//sort.inp	26 May 2005 05:19:03 -0000	1.1.2.1
+++ tests/debugger/declarative//sort.inp	6 Jul 2005 02:35:18 -0000
@@ -2,13 +2,11 @@
 register --quiet
 table_io start
 finish
-set format pretty
-set depth 1
+set format flat
+set size 1
 dd
-set depth 10
 print io 9
-set depth 1
 no
 yes
-quit
+a
 quit -y

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