Files
mercury/tests/debugger/exception_cmd.m
Zoltan Somogyi 2cb6650e4e New test case to test the "exception" command.
Estimated hours taken:

tests/debugger/exception_cmd.*:
	New test case to test the "exception" command.

tests/debugger/exception_vars.*:
	Put this test case back the way it was.

Mmakefile:
	Enable the new test case.
2000-07-22 08:20:09 +00:00

22 lines
305 B
Mathematica

:- module exception_cmd.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module require, int.
main --> { test(42, X) }, print(X).
:- pred test(int::in, int::out) is det.
test(X, Y) :-
( X > 0 ->
error("oops")
;
Y = X + 1
).