diff --git a/library/dialect/swi.yap b/library/dialect/swi.yap index af39de07a..733ca7d20 100755 --- a/library/dialect/swi.yap +++ b/library/dialect/swi.yap @@ -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(_,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(_,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). diff --git a/packages/plunit/plunit.pl b/packages/plunit/plunit.pl index 89755c391..84fdf6762 100644 --- a/packages/plunit/plunit.pl +++ b/packages/plunit/plunit.pl @@ -92,11 +92,6 @@ throw_error(Error_term,Impldef) :- :- use_module(library(option)). :- 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. :- if(sicstus). @@ -111,6 +106,13 @@ throw_error(Error_term,Impldef) :- '$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. % % Query flags that control the testing process. Emulates @@ -137,12 +139,6 @@ set_test_flag( Name, Val ) :- retractall(test_flag(Name,_)), 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 *