simple, small test for error_handling
This commit is contained in:
parent
2cacf6f63a
commit
20f639fe7b
0
regression/errors.md
Normal file
0
regression/errors.md
Normal file
47
regression/errors.yap
Normal file
47
regression/errors.yap
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @file regression/errors.yap
|
||||
* author Vitor Santos Costa
|
||||
*
|
||||
* @defgroup ErrorHandlerTesting Test Error Handler
|
||||
* @ingroup Regression System Tests
|
||||
*
|
||||
* Just check if the error handler is up to scratch..
|
||||
*/
|
||||
|
||||
:- style_check(all).
|
||||
|
||||
:- discontiguous main/0.
|
||||
|
||||
:- initialization(main).
|
||||
|
||||
:- initialization( open('errors.md', write, _Out, [alias(user_error)]), now ).
|
||||
|
||||
:- format(user_error, ' Report on error handling~n~n', []).
|
||||
|
||||
%% + discontiguous
|
||||
:- format(user_error, ' + warning: style check discontiguous~n~n~*c~n', [4,0'~,4,0'~]).
|
||||
|
||||
a(1).
|
||||
a(2,2).
|
||||
a(1).
|
||||
|
||||
%% + multifile
|
||||
:- format(user_error, '~*c~n~n + warning: style check multifile~n~*c~n', [4,0'~,4,0'~]).
|
||||
|
||||
:- load_files(mu1,[silent(true)]).
|
||||
|
||||
:- load_files(mu2,[silent(true)]).
|
||||
|
||||
%% + singleton
|
||||
:- format(user_error, '~*c~n~n + warning: style check singleton~n~*c~n', [4,0'~,4,0'~]).
|
||||
|
||||
a(X). % X
|
||||
a(_X). % no msg
|
||||
a :- b(X) ; c(X). %no msg
|
||||
|
||||
|
||||
:- format(user_error, '~*c~n', [4,0'~]).
|
||||
|
||||
|
||||
%% end of tests,
|
||||
main.
|
1
regression/mu1.yap
Normal file
1
regression/mu1.yap
Normal file
@ -0,0 +1 @@
|
||||
a(1).
|
1
regression/mu2.yap
Normal file
1
regression/mu2.yap
Normal file
@ -0,0 +1 @@
|
||||
a(2).
|
Reference in New Issue
Block a user