Commit Graph

5 Commits

Author SHA1 Message Date
Zoltan Somogyi
3dc4babb24 Update the style of more test cases.
And update expected output files for changes in line numbers.
2021-07-27 13:29:46 +10:00
Zoltan Somogyi
fdd141bf77 Clean up the tests in the other test directories.
tests/invalid/*.{m,err_exp}:
tests/misc_tests/*.m:
tests/mmc_make/*.m:
tests/par_conj/*.m:
tests/purity/*.m:
tests/stm/*.m:
tests/string_format/*.m:
tests/structure_reuse/*.m:
tests/submodules/*.m:
tests/tabling/*.m:
tests/term/*.m:
tests/trailing/*.m:
tests/typeclasses/*.m:
tests/valid/*.m:
tests/warnings/*.{m,exp}:
    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 tests
    that check compiler error messages, expect the new line numbers.

browser/cterm.m:
browser/tree234_cc.m:
    Import only one module per line.

tests/hard_coded/boyer.m:
    Fix something I missed.
2015-02-16 12:32:18 +11:00
Julien Fischer
f4139d8d69 Remove support for the old C interface. The parser still recognises the old
pragmas but it now emits an error message saying what pragma in the "new"
foreign language interface to use instead.  (That will be deleted after the
next release.)

Remove support for nondet foreign code from the implementation.

Add some bits from the old C interface chapter of the reference manual,
about linking with C object files and the c_pointer type, to the chapter
on the foreign language interface; delete the rest.

Add an illustration of simulating nondet foreign code with Mercury clauses
and (semi)deterministic foreign_procs.

doc/reference_manual.texi:
	Delete the old C interface chapter.

	Add a section on linking against C object files to the C specific
	section of the foreign language interface chapter.  (The old version of
	this was quite mmake-specific, the new version attempts to minimise
	this.)

	Mention the c_pointer type in section on C foreign types.

	Mention that nondet foreign_procs are not allowed.  Give an example
	to use foreign code and nondeterminism.

compiler/prog_io_pragma.m:
	Emit error messages when any of the pragmas used by the old C interface
	are encountered.

compiler/prog_item.m:
	Delete the parse tree representation of import pragmas.

compiler/gcc.m:
	Replace `:- pragma import' declarations with `:- pragma foreign_proc'
	declarations for C.

compiler/add_heap_ops.m:
compiler/add_trail_ops.m:
compiler/add_pragma.m:
compiler/deep_profiling.m:
compiler/det_analysis.m:
compiler/equiv_type.m:
compiler/erl_call_gen.m:
compiler/foreign.m:
compiler/goal_util.m:
compiler/hlds_out_goal.m:
compiler/make_hlds_passes.m:
compiler/make_hlds_warn.m:
compiler/mercury_to_mercury.m
compiler/ml_code_gen.m:
compiler/module_qual.m:
compiler/modules.m:
compiler/polymorphism.m:
compiler/pragma_c_gen.m:
compiler/proc_gen.m:
compiler/prog_data.m:
compiler/recompilation.version.m:
	Delete stuff related the old C interface.

tests/hard_coded_Mmakefile:
tests/hard_coded/inline_nondet_pragma_c.*:
tests/hard_coded/nondet_c.*:
tests/hard_coded/nondet_pragma_c_bug.*:
tests/hard_coded/pragma_import.*:
	Delete these tests.  The features they exercise are no longer
	supported.

tests/*/*.m:
	Replace uses of the old C interface with the new.
2010-09-10 05:15:05 +00:00
Peter Ross
4c71c5db87 Gets the tests in tests/invalid working in the il grade.
Estimated hours taken: 3
Branches: main

Gets the tests in tests/invalid working in the il grade.

compiler/options.m:
	Add a new developer option, --no-automatic-intermodule-optimization.
	This is used to turn off intermodule optimization in the
	tests/invalid directory so that the error messages are no
	longer generated during the --make-optimization-interface
	process.

compiler/handle_options.m:
	Test automatic-intermodule-optimization when determining
	whether to turn intermodule optimization on in the il grade.

tests/invalid/Mercury.options:
tests/invalid/purity/Mercury.options:
	Add --no-automatic-intermodule-optimization.

tests/invalid/foreign_singleton.err_exp2:
tests/invalid/foreign_type_2.err_exp2:
tests/invalid/pragma_c_code_dup_var.err_exp2:
tests/invalid/pragma_c_code_no_det.err_exp2:
	Add a second expected error message for non C backends.

tests/invalid/impure_method_impl.m:
tests/invalid/multimode_missing_impure.m:
tests/invalid/multimode_syntax.m:
tests/invalid/pragma_c_code_no_det.m:
tests/invalid/purity/impure_func_t2.m:
tests/invalid/purity/impure_func_t3.m:
tests/invalid/purity/impure_func_t4.m:
tests/invalid/purity/impure_func_t5.m:
tests/invalid/purity/impure_func_t7.m:
tests/invalid/purity/impure_pred_t1.m:
tests/invalid/purity/impure_pred_t2.m:
tests/invalid/purity/purity.m:
	Add Mercury implementations of foreign_code predicates.
2002-11-07 16:17:09 +00:00
Fergus Henderson
ce7a41620d Add some test cases for my recent change to add support
Estimated hours taken: 2
Branches: main

tests/hard_coded/Mmakefile:
tests/hard_coded/multimode.m:
tests/hard_coded/multimode.exp:
tests/invalid/Mmakefile:
tests/invalid/multimode_missing_impure.m:
tests/invalid/multimode_missing_impure.err_exp:
tests/invalid/multimode_dcg.m:
tests/invalid/multimode_dcg.err_exp:
tests/invalid/multimode_syntax.m:
tests/invalid/multimode_syntax.err_exp:
	Add some test cases for my recent change to add support
	for using different clauses for different modes.
2001-05-16 17:28:43 +00:00