mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-27 15:24:00 +00:00
Estimated hours taken: 0.1 Branches: main Remove deprecated syntax from some test cases. (This was done on the release branch some time ago.) tests/*/*.m: Replace deprecated syntax.
30 lines
553 B
Mathematica
30 lines
553 B
Mathematica
:- module qual_basic_test.
|
|
|
|
% A test to ensure qualified predicates, function calls
|
|
% and higher-order constants are parsed correctly.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred qual_basic_test.main(io.state::di, io.state::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- import_module int.
|
|
|
|
qual_basic_test.main -->
|
|
io.write_string("Gotcha1!\n"),
|
|
{ A = qual_basic_test.test },
|
|
{ X = int.(A + 2) },
|
|
io.write_int(X),
|
|
io.write_string("\n"),
|
|
{ Pred = int.max },
|
|
{ call(Pred, 1, 2, Y) },
|
|
io.write_int(Y),
|
|
write_string("\n").
|
|
|
|
:- func test = int.
|
|
|
|
test = 2.
|