mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 19:03:45 +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.
68 lines
1.9 KiB
Mathematica
68 lines
1.9 KiB
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ft=mercury ts=4 sw=4 et
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% This program causes the compiler (rotd-2016-06-09) to abort with the
|
|
% following:
|
|
%
|
|
% Uncaught Mercury exception:
|
|
% Software Error: map.lookup: key not found
|
|
% Key Type: int
|
|
% Key Value: 1
|
|
% Value Type: hlds.hlds_pred.proc_info
|
|
%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
|
|
:- module bug410.
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
:- import_module bool.
|
|
:- import_module char.
|
|
:- import_module int.
|
|
:- import_module list.
|
|
:- import_module maybe.
|
|
:- import_module random.
|
|
:- import_module solutions.
|
|
:- import_module string.
|
|
:- import_module time.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
main(!IO) :-
|
|
Gen = gen(0),
|
|
make_titles(Gen, [], _ : list(string)).
|
|
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- type generator == pred(maybe(string), list(string), list(string)).
|
|
:- inst generator == (pred(out, in, out) is det).
|
|
|
|
% There is a closing parenthesis missing here.
|
|
% -------------------------------------+
|
|
% v
|
|
:- pred make_titles(generator::in(generator,
|
|
list(string)::in, list(string)::out) is det.
|
|
|
|
make_titles(GenPred, !Used) :-
|
|
GenPred(_MaybeTitle, !Used),
|
|
make_titles(GenPred, !Used).
|
|
|
|
:- pred gen(int::in, bool::out, list(string)::in, list(string)::out) is det.
|
|
|
|
gen(_, MaybeTitle, !Used) :-
|
|
MaybeTitle = yes.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
:- end_module bug410.
|
|
%---------------------------------------------------------------------------%
|