swipl-devel icon indicating copy to clipboard operation
swipl-devel copied to clipboard

plunit.....

Open koo5 opened this issue 4 years ago • 1 comments
trafficstars

given test1.pl:

:- ['../prolog/fnotation.pl'].

:- fnotation_ops($>,<$).
:- op(900,fx,<$).

eq(X,X).

:- begin_tests(tests1).

test(0,all(X=[10])) :-
gtrace/*,
	eq(
		X, 
		$>number_string(
			<$,
			$>format(
				string(<$),
				'~q',
				([$>eq(0)])
			)
		)
	)*/.

:- end_tests(tests1).

i can kind of pretend that it's ok that gtrace takes me tracing system:goal_expansion, even though i definitely didn't ask for that in any way possible. But if i un-comment the commented out part, plunit pretends that there is no test. This could be caused by an exception in the macro expansion code in fnotation.

swipl -s tests1.pl -g "run_tests"
% PL-Unit: tests1  done
% No tests to run
?- 

koo5 avatar Jan 14 '21 21:01 koo5

better yet, some kind of interaction betweeen the macro-expansion that plunit does and one that fnotation does. I mean, we all know that the swipl macro system is broken beyond all hope, while technically superior systems like ciao get no attention, but the actual implications like this should be a warning in big letters first thing in all relevant docs.

koo5 avatar Jan 14 '21 21:01 koo5