better support for plunit, and don't trust SWI flags (use SICStus flags).
This commit is contained in:
		@@ -109,6 +109,15 @@ swi_predicate_table(_,include(X,Y,Z),apply,include(X,Y,Z)).
 | 
				
			|||||||
swi_predicate_table(_,exclude(X,Y,Z),apply,exclude(X,Y,Z)).
 | 
					swi_predicate_table(_,exclude(X,Y,Z),apply,exclude(X,Y,Z)).
 | 
				
			||||||
swi_predicate_table(_,partition(X,Y,Z,A),apply,partition(X,Y,Z,A)).
 | 
					swi_predicate_table(_,partition(X,Y,Z,A),apply,partition(X,Y,Z,A)).
 | 
				
			||||||
swi_predicate_table(_,partition(X,Y,Z,A,B),apply,partition(X,Y,Z,A,B)).
 | 
					swi_predicate_table(_,partition(X,Y,Z,A,B),apply,partition(X,Y,Z,A,B)).
 | 
				
			||||||
 | 
					swi_predicate_table(_,set_test_options(X),plunit,set_test_options(X)).
 | 
				
			||||||
 | 
					swi_predicate_table(_,begin_tests(X),plunit,begin_tests(X)).
 | 
				
			||||||
 | 
					swi_predicate_table(_,begin_tests(X,Y),plunit,begin_tests(X,Y)).
 | 
				
			||||||
 | 
					swi_predicate_table(_,end_tests(X),plunit,end_tests(X)).
 | 
				
			||||||
 | 
					swi_predicate_table(_,run_tests,plunit,run_tests).
 | 
				
			||||||
 | 
					swi_predicate_table(_,run_tests(X),plunit,run_tests(X)).
 | 
				
			||||||
 | 
					swi_predicate_table(_,load_test_files(X),plunit,load_test_files(X)).
 | 
				
			||||||
 | 
					swi_predicate_table(_,running_tests,plunit,running_tests).
 | 
				
			||||||
 | 
					swi_predicate_table(_,test_report(X),plunit,test_report(X)).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
swi_mchk(X,Y) :- lists:memberchk(X,Y).
 | 
					swi_mchk(X,Y) :- lists:memberchk(X,Y).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,11 +92,6 @@ throw_error(Error_term,Impldef) :-
 | 
				
			|||||||
:- use_module(library(option)).
 | 
					:- use_module(library(option)).
 | 
				
			||||||
:- use_module(library(pairs)).
 | 
					:- use_module(library(pairs)).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
current_test_flag(Name, Value) :-
 | 
					 | 
				
			||||||
	current_prolog_flag(Name, Value).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set_test_flag(Name, Value) :-
 | 
					 | 
				
			||||||
	set_prolog_flag(Name, Value).
 | 
					 | 
				
			||||||
:- endif.
 | 
					:- endif.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:- if(sicstus).
 | 
					:- if(sicstus).
 | 
				
			||||||
@@ -111,6 +106,13 @@ throw_error(Error_term,Impldef) :-
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
'$set_source_module'(_, _).
 | 
					'$set_source_module'(_, _).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:- op(1150, fx, thread_local).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					user:term_expansion((:- thread_local(PI)), (:- dynamic(PI))) :-
 | 
				
			||||||
 | 
						prolog_load_context(module, plunit).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:- endif.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%%	current_test_flag(?Name, ?Value) is nondet.
 | 
					%%	current_test_flag(?Name, ?Value) is nondet.
 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
%	Query  flags  that  control  the    testing   process.  Emulates
 | 
					%	Query  flags  that  control  the    testing   process.  Emulates
 | 
				
			||||||
@@ -137,12 +139,6 @@ set_test_flag( Name, Val ) :-
 | 
				
			|||||||
	retractall(test_flag(Name,_)),
 | 
						retractall(test_flag(Name,_)),
 | 
				
			||||||
	asserta(test_flag(Name, Val)).
 | 
						asserta(test_flag(Name, Val)).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:- op(1150, fx, thread_local).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
user:term_expansion((:- thread_local(PI)), (:- dynamic(PI))) :-
 | 
					 | 
				
			||||||
	prolog_load_context(module, plunit).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:- endif.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		 /*******************************
 | 
							 /*******************************
 | 
				
			||||||
		 *	      IMPORTS		*
 | 
							 *	      IMPORTS		*
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user