Replace __ with . as the module qualifier symbol.
Replace references to io.state with just io.
Replace DCGs with state variables.
Replace (C->T;E) syntax for if-then-elses with (if C then T else E) syntax.
Replace if-then-elses with switches when possible and where this does not
affect what is being tested.
Replace separate pred and mode declarations with predmode declarations.
Put predicate and function declarations just before the definition
of the predicate or function.
Delete unneeded module qualifications on predicate and function declarations
and definitions.
Update .exp files (and if needed, .inp files) for the line number changes
that result from the above.
For tests that have more than one .exp file and where one of those files
is affected by the above, add a section to the source file header that says
which .exp file is for what grade, with XXXs for the (as yet) unknown parts.
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.
Estimated hours taken: 0.5
This test was failing at optimization levels -O0 and -O1 because some
unifications were not being simplified away, which led to subsequent goals
having a different goal path to what was expected.
tests/debugger/queens.m:
Write the unifications in a way which is not affected by
optimization level.
Estimated hours taken: 1
Clean up the debugger tests directory by (a) removing the long obsolete
*_lib files, and (b) separating out the three roles of the queens.m
into mdb_command_test.m and interactive.m as well as queens.m.
tests/debugger/mdb_command_test.m:
Add a trivial source file for this test. The other files of the test
case (.inp, .exp) already existed.
tests/debugger/queens.{m,exp,inp}:
Remove the tests of interactive functionality.
tests/debugger/interactive.{m,exp,inp}:
A renamed copy of the old queens.m, with the interactive functionality
intact. Note: since this test case is currently disabled, I cannot
be sure that the .exp file is quite correct in every detail.
tests/debugger/*_lib.*:
Removed these obsolete test cases, since for a while now we have
avoided depending on whether the library was compiled with tracing
or not by leaving all library code to the end and not printing
or stopping at any event inside library code.
tests/debugger/Mmakefile:
Make the necessary updates to accommodate the above changes.
Estimated hours taken: 3
Add some test cases to test interactive queries.
tests/debugger/queens.inp:
Add tests of interactive queries.
tests/debugger/Mmakefile:
Add dependency of queens.out on queens.ints.
This is needed in order for us to use interactive queries.
tests/debugger/queens.m:
Export qperm/2, for use in interactive queries.
browser/interactive_query.m:
Flush MDB_stdout after printing the prompt, so things work
properly with I/O redirections.
trace/mercury_trace_internal.c:
Fix an off-by-one error detected by the above test cases.