Closed cl-alexk closed 5 months ago
I get (with 9f87ec366dfef657ba70ebf4f0f1fdb465cff395):
?- test::run.
%
% tests started at 2024-06-28, 12:11:35
%
% running tests from object test
% file: /Users/pmoura/Downloads/state.lgt
%
! closure0: failure (in 0.000047000/0.000000000 cpu/wall seconds)
! test goal failed but should have succeeded
! in file /Users/pmoura/Downloads/state.lgt between lines 13-14
!
%
% 1 tests: 0 skipped, 0 passed, 1 failed (0 flaky)
% runtime: 0.000047000/0.000000000 cpu/wall seconds
% completed tests from object test
%
% no code coverage information collected
% tests ended at 2024-06-28, 12:11:35
%
true.
No error.
Try (simpler):
:- object(state).
:- protected(run/2).
:- meta_predicate(run(1,*)).
run(G, S) :-
phrase(G, [S]).
:- end_object.
:- object(odd, extends((state, lgtunit))).
t --> [true].
test(closure0, deterministic(S == true)) :-
::run(t, S).
:- end_object.
$ swilgt -q
?- {lgtunit(loader)}.
true.
?- logtalk_load(odd, [hook(lgtunit)]).
true.
?- odd::run.
%
% tests started at 2024-06-28, 12:17:40
%
% running tests from object odd
% file: /Users/pmoura/Downloads/odd.lgt
%
% closure0: success (in 0.000074000/0.001000000 cpu/wall seconds)
%
% 1 tests: 0 skipped, 1 passed, 0 failed (0 flaky)
% runtime: 0.000074000/0.001000000 cpu/wall seconds
% completed tests from object odd
%
% no code coverage information collected
% tests ended at 2024-06-28, 12:17:40
%
true.
With this change to your example:
return(R, [], [R]).
I get:
?- test::run.
%
% tests started at 2024-06-28, 12:33:39
%
% running tests from object test
% file: /Users/pmoura/Downloads/state.lgt
%
% closure0: success (in 0.000168000/0.000000000 cpu/wall seconds)
%
% 1 tests: 0 skipped, 1 passed, 0 failed (0 flaky)
% runtime: 0.000168000/0.000000000 cpu/wall seconds
% completed tests from object test
%
% no code coverage information collected
% tests ended at 2024-06-28, 12:33:39
%
true.
Thank you. Apparently my local install is somehow not getting this recent change via install.sh
script.