Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_is_unit_test/2 will now correctly set options. #20

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions prolog/metta_lang/metta_interp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,13 @@
'is-symbol'(X):- symbol(X).
%:- (is_mettalog->switch_to_mettalog;switch_to_mettarust).

set_is_unit_test(false):-
forall(option_value_def(A,B),set_option_value_interp(A,B)),
set_option_value_interp('trace-on-test',false),
set_option_value_interp('trace-on-fail',false),
set_option_value_interp('load',silent),
set_option_value_interp('test',false),
!.
set_is_unit_test(TF):-
forall(option_value_def(A,B),set_option_value_interp(A,B)),
set_option_value_interp('trace-on-test',false),
Expand All @@ -600,6 +607,7 @@
set_option_value_interp('trace-on-exec',TF),
set_option_value_interp('trace-on-eval',TF),*/
% if_t( \+ TF , set_prolog_flag(debug_on_interrupt,true)),
% TODO: what is this cutting here?
!.

:- meta_predicate fake_notrace(0).
Expand Down
Loading