mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
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.
87 lines
2.1 KiB
Mathematica
87 lines
2.1 KiB
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
:- module foreign_valid.
|
|
|
|
:- interface.
|
|
|
|
:- import_module int.
|
|
|
|
:- pred test1(int::out) is det.
|
|
:- pred test2(int::out) is det.
|
|
:- pred test3(int::out) is det.
|
|
:- pred test4(int::out) is det.
|
|
:- pred test5(int::out) is det.
|
|
:- pred test6(int::out) is det.
|
|
:- pred test7(int::out) is det.
|
|
:- pred test8(int::out) is det.
|
|
:- pred test9(int::out) is det.
|
|
:- pred test10(int::out) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- pragma foreign_proc("C", test1(X::out),
|
|
[will_not_call_mercury, promise_pure, thread_safe],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma foreign_proc("C", test2(X::out),
|
|
[may_call_mercury, promise_pure, thread_safe],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma foreign_proc("C", test3(X::out),
|
|
[will_not_call_mercury, promise_pure, thread_safe, does_not_terminate], "
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma foreign_proc("C", test4(X::out),
|
|
[may_call_mercury, promise_pure, thread_safe, terminates],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma foreign_proc("C", test5(X::out),
|
|
[will_not_call_mercury, promise_pure, thread_safe, terminates],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma foreign_proc("C", test6(X::out),
|
|
[may_call_mercury, promise_pure, thread_safe, does_not_terminate],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma terminates(test7/1).
|
|
:- pragma foreign_proc("C", test7(X::out),
|
|
[may_call_mercury, promise_pure, thread_safe],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma does_not_terminate(test8/1).
|
|
:- pragma foreign_proc("C", test8(X::out),
|
|
[will_not_call_mercury, promise_pure, thread_safe],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma terminates(test9/1).
|
|
:- pragma foreign_proc("C", test9(X::out),
|
|
[may_call_mercury, promise_pure, thread_safe, terminates],
|
|
"
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- pragma does_not_terminate(test10/1).
|
|
:- pragma foreign_proc("C", test10(X::out),
|
|
[will_not_call_mercury, promise_pure, thread_safe, does_not_terminate], "
|
|
X = (MR_Integer) 3;
|
|
").
|
|
|
|
:- end_module foreign_valid.
|