Commit Graph

2 Commits

Author SHA1 Message Date
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
Zoltan Somogyi
0c87e77334 Fix a bug that caused an abort of the MLDS code generator when it was given a
Estimated hours taken: 1
Branches: main

Fix a bug that caused an abort of the MLDS code generator when it was given a
switch on a value of a foreign enum.

compiler/ml_switch_gen.m:
	The bug was caused by the fact that the code that handles switches
	handled only two kinds of tags (ints and strings), and did not list
	the kinds of tags it did NOT handle. Change that to handle foreign
	tags, and switch to using a switch instead of an if-then-else chain
	to prevent the problem from recurring in the future.

compiler/options.m:
	Add an option to allow the configure script to recognize the presence
	of the fix, since we can't add code to the compiler that switches on
	foreign enums unless the fix is installed.

tests/hard_coded/foreign_enum_switch.{m,exp}:
	A new test case to test the fix.

tests/hard_coded/Mmakefile:
	Enable the new test case.
2007-09-07 09:56:05 +00:00