Skip to content

Commit

Permalink
Fix lgtunit tool misreporting of code coverage information when an …
Browse files Browse the repository at this point in the history
…entity defines clauses for Prolog module multifile predicates
  • Loading branch information
pmoura committed Oct 1, 2014
1 parent e668b7c commit ad3a773
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Expand Up @@ -82,6 +82,9 @@ instead of printing a variable.
* FIXED: Printing of source file information for a traced head of a multifile
clause of a Prolog module when using the `debugger` tool.

* FIXED: The `lgtunit` tool misreporting of code coverage information when an
entity defines clauses for Prolog module multifile predicates.

Contributions
-------------

Expand Down
2 changes: 1 addition & 1 deletion docs/lgtunit_0.html
Expand Up @@ -27,7 +27,7 @@ <h1 class="code">lgtunit</h1>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2014/9/9</code>
<code>2014/10/1</code>
</dd>
</dl>
<dl class="properties">
Expand Down
2 changes: 1 addition & 1 deletion docs/lgtunit_tool.html
Expand Up @@ -14,6 +14,6 @@ <h1>Logtalk unit testing tool</h1>
<li><a href="lgtunit_0.html">lgtunit</a></li>
<li><a href="lgtunit_messages_0.html">lgtunit_messages</a></li>
</ul>
<p>Generated on Qua 1 Out 2014 11:45:51 WEST</p>
<p>Generated on Qua 1 Out 2014 14:11:38 WEST</p>
</body>
</html>
6 changes: 5 additions & 1 deletion tools/lgtunit/lgtunit.lgt
Expand Up @@ -30,7 +30,7 @@
:- info([
version is 2.0,
author is 'Paulo Moura',
date is 2014/09/09,
date is 2014/10/01,
comment is 'A simple unit test framework featuring predicate clause coverage.'
]).

Expand Down Expand Up @@ -528,6 +528,10 @@
functor(Template, EntityFunctor, EntityArity),
assertz(fired_(Template, Other::Functor/Arity, N))
).
fired(_, ':'(_,_), _) :-
% clauses of Prolog module multifile predicates currently have
% an index of zero with no associated source data information
!.
fired(Entity, Head, N) :-
functor(Head, Functor, Arity),
( fired_(Entity, Functor/Arity, N) ->
Expand Down

0 comments on commit ad3a773

Please sign in to comment.