Files
mercury/tests/debugger/higher_order.exp
Zoltan Somogyi 33eb3028f5 Clean up the tests in half the test directories.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
    Make these tests use four-space indentation, and ensure that
    each module is imported on its own line. (I intend to use the latter
    to figure out which subdirectories' tests can be executed in parallel.)

    These changes usually move code to different lines. For the debugger tests,
    specify the new line numbers in .inp files and expect them in .exp files.
2015-02-14 20:14:03 +11:00

70 lines
2.5 KiB
Plaintext

E1: C1 CALL pred higher_order.main/2-0 (det) higher_order.m:18
mdb> echo on
Command echo enabled.
mdb> context none
Contexts will not be printed.
mdb> format_param size 100
mdb> format_param depth 100
mdb> format flat
mdb> step
E2: C2 CALL pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) float_add2(3.0)
HeadVar__2 [1.0, 2.0, 3.0, 4.0, 5.0]
mdb> finish
E3: C2 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) float_add2(3.0)
HeadVar__2 [1.0, 2.0, 3.0, 4.0, 5.0]
HeadVar__3 [4.0, 5.0, 6.0, 7.0, 8.0]
mdb> step
E4: C3 CALL pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) float_op3(4.0, 5.0)
HeadVar__2 [1.0, 2.0, 3.0, 4.0, 5.0]
mdb> finish
E5: C3 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) float_op3(4.0, 5.0)
HeadVar__2 [1.0, 2.0, 3.0, 4.0, 5.0]
HeadVar__3 [9.0, 14.0, 19.0, 24.0, 29.0]
mdb> step
E6: C4 CALL pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) max(3)
HeadVar__2 [1, 2, 3, 4, 5]
mdb> finish
E7: C4 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) max(3)
HeadVar__2 [1, 2, 3, 4, 5]
HeadVar__3 [3, 3, 3, 4, 5]
mdb> step
E8: C5 CALL pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) lambda_higher_order_m_27([6])
HeadVar__2 [[1, 2], [3, 4, 5]]
mdb> finish
E9: C5 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) lambda_higher_order_m_27([6])
HeadVar__2 [[1, 2], [3, 4, 5]]
HeadVar__3 [[6, 1, 2], [6, 3, 4, 5]]
mdb> step
E10: C6 CALL pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) lambda_higher_order_m_28(["a"])
HeadVar__2 [["one", "two"], ["three", "four", "five"]]
mdb> finish
E11: C6 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
P (arg 1) lambda_higher_order_m_28(["a"])
HeadVar__2 [["one", "two"], ["three", "four", "five"]]
HeadVar__3 [["a", "one", "two"], ["a", "three", "four", "five"]]
mdb> continue -S
[4.0, 5.0, 6.0, 7.0, 8.0]
[9.0, 14.0, 19.0, 24.0, 29.0]
[3, 3, 3, 4, 5]
[[6, 1, 2], [6, 3, 4, 5]]
[["a", "one", "two"], ["a", "three", "four", "five"]]