tests/hard_coded/*.m:
Update programming style, unless doing so would change
the meaning of the test, in particular:
- use '.' as a module qualifier in place of '__'
- use {write,print}_line where appropriate
- use if-then-else in place of C -> T ; E
- use state variables in place of DCGs
tests/hard_coded/dir_test.m:
Document what the expected outputs correspond to.
Use a uniform module qualifier in the output.
tests/hard_coded/dir_test.exp*:
Conform to the above change.
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: 2
Branches: main
Improve the testing of loop invariant hoisting.
tests/hard_coded/Mercury.options:
Ensure that we compile the tests of loop invariant hoisting
with the loop invariant hoisting optimization enabled, and with
`--trace-optimized' so that it stays enabled even in debugging grades.
tests/hard_coded/loop_inv_test.m:
tests/hard_coded/loop_inv_test.inp:
tests/hard_coded/loop_inv_test.exp:
Add a new test of loop invariant hoisting -- one that our
current implementation actually passes.
tests/hard_coded/Mmakefile:
Enable the new test.
tests/hard_coded/Mmakefile:
tests/hard_coded/loop_inv_test0.m:
tests/hard_coded/loop_inv_test1.m:
tests/hard_coded/loop_inv_test2.m:
Add some comments, explaining why we don't pass these test cases.
tests/hard_coded/loop_inv_test1.m:
Modify the second test in this test case, so that it is not
testing the same thing as loop_inv_test0.m.
Branches: main
Estimated hours taken: 0.25
tests/hard_coded/Mmakefile:
tests/hard_coded/loop_inv_test0.m:
tests/hard_coded/loop_inv_test0.inp:
tests/hard_coded/loop_inv_test1.m:
tests/hard_coded/loop_inv_test1.inp:
tests/hard_coded/loop_inv_test2.m:
tests/hard_coded/loop_inv_test2.inp:
Add some test cases to test that the loop invariant hoisting
optimization gets applied.