Files
mercury/tests
Ian MacLarty ee053bf692 Make the I/O tabling transformation respect :- pragma no_inline directives
Estimated hours taken: 3
Branches: main and 0.12

Make the I/O tabling transformation respect :- pragma no_inline directives
by creating a copy of the predicate to be transformed and calling the
copy, instead of duplicating the body, if :- pragma no_inline is
given.  This is necessary to avoid duplicate label errors from the C compiler
when the I/O tabled foreign proc uses labels.

compiler/hlds_pred.m:
	Add a new functor to the pred_creation type to indicate that a pred
	was created by the I/O tabling transformation.

	Fix some formatting.

compiler/table_gen.m:
	If the predicate to be I/O tabled has a no_inline pragma attached to
	it, then create a copy of the predicate and call the new predicate in
	the transformed version.

compiler/trace_params.m:
	Do not trace the copy of the I/O tabled predicate.

doc/reference_manual.texi
	Document the tabled_for_io attribute.

tests/debugger/Mercury.options:
tests/debugger/Mmakefile:
tests/debugger/io_tab_goto.data:
tests/debugger/io_tab_goto.exp:
tests/debugger/io_tab_goto.inp:
tests/debugger/io_tab_goto.m:
	Test that foreign C code with labels is I/O tabled correctly.

tests/debugger/declarative/Mmakefile:
tests/debugger/declarative/tabled_read_decl_goto.data:
tests/debugger/declarative/tabled_read_decl_goto.exp:
tests/debugger/declarative/tabled_read_decl_goto.inp:
tests/debugger/declarative/tabled_read_decl_goto.m:
	Test declarative debugging of I/O tabled foreign predicates with
	gotos.
2005-10-06 07:59:28 +00:00
..

The Mercury test suite is (dis)organized into a directory hierarchy.

`mmake' will run the tests in the directory it is
invoked in and all subdirectories of that subdirectory.
Use `mmake runtests_local' to just run the local tests without
the subdirectories.

To run just the tests that failed in a previous test run,
use `mmake ERROR_FILE=FILE', where FILE is a copy of the
runtests.errs file from the previous run.

Both the bootcheck script and the nightly script use `mmake'
to run all the tests.

Unless otherwise stated, the tests in each directory compile
the test programs and compare their output against hand-coded
`.exp' (or `.exp2', `.exp3', etc) files.

benchmarks
	This directory contains Mercury versions of the benchmarks.

debugger
	This directory is for testing mdb, the Mercury debugger.
	Programs are compiled with deep tracing turned on.  The
	tests in this directory are not performed if the base grade
	is `jump' or `fast'.

debugger/declarative
	This directory is for testing the declarative debugging
	features of mdb.

general
hard_coded
	These directories are for general test cases.

	(It might be a good idea to split this into tests
	of particular features and regression tests that check
	for old bugs.  But for the moment, just about everything
	goes in here.)

	The historical reason for the separate `general' and `hard_coded'
	directories was that the tests in `general' worked with NU-Prolog
	and compared the Mercury output with the NU-Prolog output,
	but the tests in `hard_coded' didn't work with NU-Prolog, so
	their expected output needed to be hard-coded. We no longer
	support compilation with NU-Prolog, so everything goes
	in hard_coded now.

recompilation
	This directory contains tests of the smart recompilation system.
	As well as checking for the correct output from the test
	programs these tests also examine the `.err' files to
	make sure that all necessary recompilations are performed.

valid
	This directory is for test cases that are not complete
	programs. We just check that the files compile.

invalid
	This directory is for test cases that are invalid
	programs. We check that the files do *not* compile,
	and check that the errors match those in the hand-written
	`.err_exp' file.

warnings
	This directory is for tests of compiler warnings. These work by
	comparing the warnings emitted by the compiler with those given
	in the hand-written `.exp' file. 

term
	This directory tests the compiler's termination analyser.  These
	tests work by comparing the contents of the .trans_opt file emitted
	by the compiler with the hand-written `.trans_opt_exp' file.
	This directory is also used for testing the compiler's exception analysis.