Commit Graph

4 Commits

Author SHA1 Message Date
Zoltan Somogyi
a69fc36be0 Update some tests' programming style. 2020-10-05 17:53:05 +11:00
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
Simon Taylor
6991a104d2 When writing a mode-specific clause in a `.opt' file, get the modes
Estimated hours taken: 0.5
Branches: main

compiler/hlds_out.m:
	When writing a mode-specific clause in a `.opt' file, get the modes
	of the procedure using proc_info_declared_argmodes rather than
	proc_info_argmodes. This is necessary because the test in
	make_hlds.m to work out whether a clause matches a mode declaration
	uses syntactic equality on the modes, but the modes returned by
	proc_info_argmodes may have been expanded by
	propagate_types_into_modes.

compiler/intermod.m:
	Tell hlds_out.m to use the declared modes when writing clauses.

tests/hard_coded/multimode.m:
tests/hard_coded/multimode_main.exp:
	Test case.
2001-08-18 11:33:54 +00:00
Fergus Henderson
2bd50c8c37 Fix a bug in my earlier change to add support for writing
Estimated hours taken: 3
Branches: main

Fix a bug in my earlier change to add support for writing
different clauses for different modes -- it didn't handle
intermodule optimization, because the `.opt' files weren't
being output correctly.

compiler/hlds_out.m:
	Change hlds_out__write_clause so that it outputs the
	mode annotations, if needed.

tests/hard_coded/Mmakefile:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/intermod_multimode_main.m:
tests/hard_coded/intermod_multimode_main.exp:
	Add a multi-module test case for using different clauses
	for different modes.
2001-05-27 09:58:37 +00:00