Skip to content

Commit

Permalink
Improve lgtunit tool output for failed tests due to the wrong error…
Browse files Browse the repository at this point in the history
… being generated
  • Loading branch information
pmoura committed Mar 30, 2018
1 parent f851839 commit b157cb5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ Documentation
* FIXED: Typo in link to the `context/1` built-in method from the Reference
Manual index.

Tools
-----

* IMPROVED: The `lgtunit` tool output for failed tests due to the wrong error
being generated.

Tests
-----

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ <h1>Documentation index</h1>
<li><a href="entity_index.html">Entity index</a></li>
<li><a href="predicate_index.html">Predicate index</a></li>
</ul>
<p>Generated on Wed Mar 21 09:13:46 WET 2018</p>
<p>Generated on Fri Mar 30 15:09:05 WEST 2018</p>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/lgtunit_messages_0.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ <h1 class="code">lgtunit_messages</h1>
</dd>
<dt class="key">version:</dt>
<dd class="value">
<code>2.2</code>
<code>2.3</code>
</dd>
<dt class="key">date:</dt>
<dd class="value">
<code>2018/3/10</code>
<code>2018/3/30</code>
</dd>
</dl>
<dl class="properties">
Expand Down
8 changes: 5 additions & 3 deletions tools/lgtunit/lgtunit_messages.lgt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
:- category(lgtunit_messages).

:- info([
version is 2.2,
version is 2.3,
author is 'Paulo Moura',
date is 2018/03/10,
date is 2018/03/30,
comment is 'Logtalk unit test framework default message translations.'
]).

Expand Down Expand Up @@ -221,7 +221,9 @@
failed_test_reason(error_instead_of_success(Error)) -->
[' test goal throws an error but should have succeeded: ~q'-[Error], nl].
failed_test_reason(wrong_error(ExpectedError, Error)) -->
[' test goal throws the wrong error: expected ~q but got ~q'-[ExpectedError, Error], nl].
[' test goal throws the wrong error:'-[], nl],
[' expected ~q'-[ExpectedError], nl],
[' but got ~q'-[Error], nl].

failed_test_reason(quick_check_failed(Goal)) -->
[' quick check test failure: ~q'-[Goal], nl].
Expand Down

0 comments on commit b157cb5

Please sign in to comment.