
:- ensure_loaded(qtest_header).

:- dynamic(tested/1).

qtest :- true.
qtest :- 2 is 1+1.
qtest(1) :- 3 is 6-3.
qtest([red, green]) :- assert(tested(1)).
qtest([red, purple]) :- assert(tested(2)).
qtest :- assert(tested(3)).
	

:- ensure_loaded(qtest).

go :-
	run_qtests(_),
	tested(1), tested(2), retractall(tested(_)),

	run_qtests(List, memberchk(green, List)),
	tested(1), \+tested(2), retractall(tested(_)),

	% the fact that qtest/0 is rewritten with arg anon(_) is
	% a documented part of the interface.
	run_qtests(anon(_)),
	\+tested(1), \+tested(2), tested(3), retractall(tested(_)),

	true.



	