Commit Graph

9 Commits

Author SHA1 Message Date
Peter Wang
88047bbb45 Delete Erlang from tests.
tests/general/float_test.exp3:
tests/general/float_test.m:
tests/general/read_dir_regression.exp4:
tests/general/read_dir_regression.m:
tests/hard_coded/remove_file.exp2:
tests/hard_coded/remove_file.m:
    Delete Erlang backend specific expected outputs.

tests/hard_coded/Mmakefile:
tests/hard_coded/erlang_deconstruct.exp:
tests/hard_coded/erlang_deconstruct.m:
tests/hard_coded/existential_list.exp:
tests/hard_coded/existential_list.m:
tests/valid/Mmakefile:
tests/valid/erl_ite_vars.m:
tests/valid/zf_erlang_bug.m:
    Delete erlang target specific tests.

tests/*:
    Delete Erlang foreign procs and foreign types.
2020-10-27 11:10:11 +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
Peter Wang
75771a9b6e Allow testing of java grade. Requires using `mmc --make' for now.
Branches: main

Allow testing of java grade.  Requires using `mmc --make' for now.
This patch does not attempt to fix test failures.

tests/Mmake.common:
        Delete unneeded Java-specific rule, which was broken.

tests/benchmarks/Mmakefile:
tests/general/Mmakefile:
tests/general/string_format/Mmakefile:
tests/grade_subdirs/Mmakefile:
tests/hard_coded/Mmakefile:
tests/recompilation/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
        Don't deliberately disable tests in java grade.

tests/*.m:
        Add Java foreign code.

        Write dummy procedures instead of abusing `:- external'.
2009-08-14 03:21:55 +00:00
Peter Wang
40a21f2d78 Implement some more I/O primitives for Erlang.
Estimated hours taken: 1.5
Branches: main

library/io.m:
	Implement some more I/O primitives for Erlang.

tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
tests/hard_coded/Mmakefile:
tests/invalid/Mmakefile:
tests/par_conj/Mmakefile:
tests/recompilation/Mmakefile:
tests/valid/Mmakefile:
	Disable test cases which don't apply to the Erlang backend for
	whatever reason.

tests/hard_coded/constraint_order.m:
tests/hard_coded/copy_pred.m:
tests/hard_coded/copy_pred_2.m:
tests/hard_coded/export_test.m:
tests/hard_coded/external_unification_pred.m:
tests/hard_coded/foreign_type3.m:
tests/hard_coded/ho_solns.m:
tests/hard_coded/ho_univ_to_type.m:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/intermod_poly_mode_2.m:
tests/hard_coded/lookup_disj.m:
tests/hard_coded/multimode.m:
tests/hard_coded/no_inline.m:
tests/hard_coded/pragma_foreign_export.m:
tests/hard_coded/redoip_clobber.m:
tests/hard_coded/rnd.m:
tests/hard_coded/sub-modules/sm_exp_bug.m:
tests/hard_coded/typeclasses/impure_methods.m:
tests/par_conj/dep_par_10.m:
tests/valid/flatten_conj_bug.m:
	Fix test cases which were failing with the Erlang for simple reasons,
	mostly missing foreign procs or foreign types.

tests/general/string_format_test_2.exp5:
tests/general/string_format_test_3.exp5:
tests/hard_coded/exceptions/test_uncaught_exception.exp5:
tests/hard_coded/no_fully_strict.exp5:
	Add expected outputs with stack dumps for Erlang.
2007-06-06 01:48:15 +00:00
Julien Fischer
73e40cd5e2 Make it an error for the (promised) purity of a foreign clause to disagree
Estimated hours taken: 6
Branches: main, release

Make it an error for the (promised) purity of a foreign clause to disagree
with the declared purity of the corresponding predicate or function
declaration.  We only perform this check in the absence of a
promise_{pure,semipure} pragma for the predicate or function.

Previously this situation was sometimes picked up by purity analysis but not
in all cases.  For example, if a predicate was declared impure but the
foreign_proc was promised pure it wasn't reported.  In that particular case
it was a problem because if the foreign_proc did not have any outputs, then
simplify.m might have optimised its body away (which is how I noticed this).

compiler/add_pramga.m:
	In the absence of promise_{pure,semipure} pragmas emit error messages
	about mismatches between the declared purity of a procedure and the
	(promised) purity of a foreign clause for it.

compiler/mode_errors.m:
	Fix a typo in an error message: s/becaise/because/

compiler/purity.m:
	Fix a bug reported by Ian. Inconsistent purity annotation were being
	treated as both a warning and an error.  Make it into an error.

library/private_builtin.m:
library/solutions.m:
	Delete bogus purity promises from foreign_proc attributes reported by
	the new check.

tests/invalid/Mmakefile:
tests/invalid/foreign_purity_mismatch.{m,err_exp}:
	Test case for the new error.

compiler/simplify.m:
compiler/prog_io_pragma.m:
	Fix some formatting.

tests/*/*:
	Fix purity errors picked up by the new check.
2006-07-10 04:41:00 +00:00
Peter Ross
997dd45689 Get the tests in hard_coded to compile in the grade il.
Estimated hours taken: 3
Branches: main

Get the tests in hard_coded to compile in the grade il.  The tests may
still fail because of other reasons.

tests/hard_coded/constraint_order.m:
tests/hard_coded/copy_pred.m:
tests/hard_coded/copy_pred_2.m:
tests/hard_coded/dupcall_impurity.m:
tests/hard_coded/export_test.m:
tests/hard_coded/foreign_import_module.m:
tests/hard_coded/foreign_type3.m:
tests/hard_coded/ho_solns.m:
tests/hard_coded/ho_univ_to_type.m:
tests/hard_coded/impure_foreign.m:
tests/hard_coded/impure_prune.m:
tests/hard_coded/intermod_c_code2.m:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/multimode.m:
tests/hard_coded/no_inline.m:
tests/hard_coded/rnd.m:
	Provide C# implementation of C code.

tests/hard_coded/existential_types_test.m:
tests/hard_coded/frameopt_pragma_redirect.m:
tests/hard_coded/mode_choice.m:
tests/hard_coded/pragma_c_code.m:
tests/hard_coded/pragma_inline.m:
tests/hard_coded/target_mlobjs.m:
tests/hard_coded/unused_float_box_test.m:
	Provide Mercury implementation of C code.

tests/hard_coded/redoip_clobber.m:
	Provide MC++ implementation of C code.
2002-11-28 16:33:45 +00:00
Simon Taylor
217cb9c2e1 Don't attempt to module qualify the mode annotations on clauses
Estimated hours taken: 0.5
Branches: main

compiler/make_hlds.m:
	Don't attempt to module qualify the mode annotations on clauses
	read from `.opt' files. They are already fully module qualified.

tests/hard_coded/Mmakefile:
tests/hard_coded/intermod_multimode.m:
tests/hard_coded/intermod_multimode_main.exp:
	Test case.
2001-08-28 09:27:42 +00: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