mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 10:53:40 +00:00
tests/invalid_onlydepend:
Move the one test case in tests/invalid for which we want to check
the error messages generated during the generation of dependencies
to this new test directory.
tests/invalid_nodepend:
Move all test cases in tests/invalid which get errors during the
generation of dependencies but for which we want to check the error
messages generated during normal compilation to this new test directory.
tests/invalid_nodepend/Mmakefile:
tests/invalid_nodepend/Mercury.options:
tests/invalid_onlydepend/Mmakefile:
tests/invalid_onlydepend/Mercury.options:
Versions of the same files in tests/invalid, but containing only
the entries relevant to the moved test cases.
tests/invalid/Mmakefile:
tests/invalid/Mercury.options:
Delete the entries that refer to the moved test cases.
tests/README:
Document the two new test directories.
tools/bootcheck:
Add invalid_onlydepend and invalid_nodepend to the list of
test directories.
98 lines
2.6 KiB
Mathematica
98 lines
2.6 KiB
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
|
|
% This file contains a bunch of test cases, all of which should result
|
|
% in errors of one kind or another.
|
|
|
|
:- module errors1.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- pred pred_with_no_clauses_or_mode_declaration(int).
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- pred pred_with_no_clauses(int).
|
|
:- mode pred_with_no_clauses(input).
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
/*
|
|
:- pred pred_with_invalid_goal.
|
|
|
|
pred_with_invalid_goal :-
|
|
5.
|
|
*/
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- mode mode_declaration_without_pred_declaration.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- mode missing_pred_declaration.
|
|
|
|
missing_pred_declaration.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
clause_without_pred_or_mode_declaration.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- pred pred_which_calls_non_existant_pred.
|
|
|
|
pred_which_calls_non_existant_pred :-
|
|
non_existant_pred.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- type type_with_multiply_defined_ctors
|
|
---> a
|
|
; a
|
|
; f(int)
|
|
; f(int).
|
|
|
|
:- type du_type_which_references_undefined_type
|
|
---> f(undefined_type).
|
|
|
|
:- type eqv_type_which_references_undefined_type == undefined_type.
|
|
|
|
:- type circular_eqv_type == circular_eqv_type.
|
|
|
|
:- type indirectly_circular_eqv_type_1 == indirectly_circular_eqv_type_2.
|
|
:- type indirectly_circular_eqv_type_2 == indirectly_circular_eqv_type_1.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- pred pred_which_binds_type_param(TypeParam::input).
|
|
|
|
pred_which_binds_type_param(Argument) :-
|
|
Argument = 0.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- pred pred_with_unresolved_polymorphism.
|
|
|
|
pred_with_unresolved_polymorphism :-
|
|
pred_which_binds_type_param(Arg).
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- pred pred_producing_string(string).
|
|
|
|
:- pred pred_expecting_int(int).
|
|
|
|
:- pred pred_with_type_error.
|
|
|
|
pred_with_type_error :-
|
|
pred_producing_string(X),
|
|
pred_expecting_int(X).
|
|
|
|
:- pred pred_with_singleton_vars(T).
|
|
|
|
pred_with_singleton_vars(X).
|
|
|
|
%---------------------------------------------------------------------------%
|