Skip to content

Commit f299efe

Browse files
authored
Merge pull request #27 from bxparks/develop
0.5.2 - rename XxxNow() to XxxTestNow() to avoid name collisions
2 parents 0a84107 + 7f277a0 commit f299efe

File tree

120 files changed

+1235
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1235
-239
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
* 0.5.2 (2018-05-08)
4+
* Rename failNow(), passNow(), skipNow(), expireNow() macros to
5+
failTestNow(), passTestNow(), skipTestNow(), expireTestNow() to reduce
6+
the chance of name collision.
37
* 0.5.1 (2018-05-01)
48
* Support ESP32.
59
* Add failNow(), passNow(), skipNow() and expireNow() macros.

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A unit testing framework for Arduino platforms inspired by ArduinoUnit and
44
Google Test.
55

6-
Version: 0.5.1 (2018-05-01)
6+
Version: 0.5.2 (2018-05-08)
77

88
## Summary
99

@@ -87,10 +87,10 @@ Here are the features in AUnit which are not available in ArduinoUnit:
8787
* `externTestF()`
8888
* `externTestingF()`
8989
* Status setters
90-
* `passNow()`
91-
* `failNow()`
92-
* `skipNow()`
93-
* `expireNow()`
90+
* `passTestNow()`
91+
* `failTestNow()`
92+
* `skipTestNow()`
93+
* `expireTestNow()`
9494
* `teardown()` method, mirroring the `setup()`
9595
* `teardown()`
9696
* Tested on the following Arduino platforms:
@@ -251,9 +251,9 @@ testing(looping_test) {
251251
if (...) {
252252
pass();
253253
} else if (...) {
254-
failNow();
254+
failTestNow();
255255
} else {
256-
skipNow();
256+
skipTestNow();
257257
}
258258
}
259259
@@ -664,41 +664,43 @@ AUnitTest.ino, line 439.
664664
_AUnit has a separate message handler to print a customized message for the
665665
assertTestXxx() meta assertion macros._
666666

667-
### Status Indicator Methods
667+
### Unconditional Termination
668668

669669
The following macros can be used inside the body of `test()` or `testing()`
670-
macro to indicate whether the test has passed or failed (or reached some other
671-
status). Each macro prints a short message, and returns immediately from the
672-
test, much like an `assertXxx()` macro that fails.
670+
macro to terminate a test unconditionally. Each macro prints a short message,
671+
and returns immediately from the test, much like an `assertXxx()` macro that
672+
fails.
673673

674-
* `passNow()` [*]
675-
* `failNow()` [*]
676-
* `skipNow()` [*]
677-
* `expireNow()` [*]
674+
* `passTestNow()` [*]
675+
* `failTestNow()` [*]
676+
* `skipTestNow()` [*]
677+
* `expireTestNow()` [*]
678678

679-
The message looks like:
679+
The messages look like:
680680
```
681-
Status timed out, file AUnitTest.ino, line 381.
682-
Status failed, file AUnitTest.ino, line 378.
681+
Status passed, file AUnitTest.ino, line 360.
683682
Status failed, file AUnitTest.ino, line 378.
684683
Status skipped, file AUnitTest.ino, line 380.
684+
Status timed out, file AUnitTest.ino, line 391.
685685
```
686686

687-
The above methods are recommended over the following methods on the `Test` class
688-
because the `xxxNow()` versions print the file and line number of the statement.
689-
The methods on `Test` are completely silent which makes debugging difficult.
687+
The following methods on the `Test` class also set the `status` of the test, but
688+
these methods do not print any messages (which makes debugging difficult) and
689+
they do *not* terminate the test immediately.
690690

691691
* `pass()` - test passed
692692
* `fail()` - test failed
693693
* `skip()` - test skipped
694694
* `expire()` - test timed out [*]
695695

696+
In most cases, the `failTestNow()`, `skipTestNow()` and `expireTestNow()` macros
697+
are more useful than the equivalent methods in the `Test` class. However, in a
698+
testing() loop test, the pass() method is probably better than the passTestNow()
699+
macro because we usually don't want to see an error message for a test that
700+
passes.
701+
696702
***ArduinoUnit Compatibility***: _
697-
_The method(s) marked by [*] are only available in AUnit. For most cases,
698-
the failNow(), skipNow() and expireNow() methods are recommended over the
699-
methods from ArduinoUnit which have been carried over for compatibility and for
700-
internal use. In a testing() loop test, the pass() method may be more useful
701-
than the passNow() macro._
703+
_The method(s) marked by [*] are only available in AUnit._
702704

703705
### Overridable Methods
704706

docs/doxygen.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "AUnit"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.5.1
41+
PROJECT_NUMBER = 0.5.2
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

docs/html/AUnitVerbose_8h.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tr style="height: 56px;">
2323
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">AUnit
25-
&#160;<span id="projectnumber">0.5.1</span>
25+
&#160;<span id="projectnumber">0.5.2</span>
2626
</div>
2727
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
2828
</td>
@@ -71,10 +71,10 @@
7171
</div><!--header-->
7272
<div class="contents">
7373

74-
<p>Same as <a class="el" href="AUnit_8h_source.html">AUnit.h</a> except that the verbose versions of the various assertXxx() macros are provided.
74+
<p>Same as <a class="el" href="AUnit_8h.html" title="Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided...">AUnit.h</a> except that the verbose versions of the various assertXxx() macros are provided.
7575
<a href="#details">More...</a></p>
7676
<div class="textblock"><code>#include &quot;aunit/Verbosity.h&quot;</code><br />
77-
<code>#include &quot;aunit/Compare.h&quot;</code><br />
77+
<code>#include &quot;<a class="el" href="Compare_8h_source.html">aunit/Compare.h</a>&quot;</code><br />
7878
<code>#include &quot;aunit/Printer.h&quot;</code><br />
7979
<code>#include &quot;aunit/Test.h&quot;</code><br />
8080
<code>#include &quot;aunit/Assertion.h&quot;</code><br />
@@ -91,7 +91,7 @@
9191
<div class="center"><img src="AUnitVerbose_8h__incl.png" border="0" usemap="#_2home_2brian_2dev_2AUnit_2src_2AUnitVerbose_8h" alt=""/></div>
9292
<map name="_2home_2brian_2dev_2AUnit_2src_2AUnitVerbose_8h" id="_2home_2brian_2dev_2AUnit_2src_2AUnitVerbose_8h">
9393
<area shape="rect" id="node2" href="Verbosity_8h_source.html" title="aunit/Verbosity.h" alt="" coords="391,468,511,495"/>
94-
<area shape="rect" id="node4" href="Compare_8h_source.html" title="aunit/Compare.h" alt="" coords="45,95,163,121"/>
94+
<area shape="rect" id="node4" href="Compare_8h.html" title="This file provides overloaded compareXxx(a, b) functions which are used by the various assertXxx(a..." alt="" coords="45,95,163,121"/>
9595
<area shape="rect" id="node6" href="Printer_8h_source.html" title="aunit/Printer.h" alt="" coords="365,319,467,345"/>
9696
<area shape="rect" id="node7" href="Test_8h_source.html" title="aunit/Test.h" alt="" coords="439,393,529,420"/>
9797
<area shape="rect" id="node9" href="Assertion_8h_source.html" title="aunit/Assertion.h" alt="" coords="492,319,612,345"/>
@@ -112,11 +112,11 @@
112112
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
113113
Macros</h2></td></tr>
114114
<tr class="memitem:a87cbb10969eff63f8ae66afc4e9457eb"><td class="memItemLeft" align="right" valign="top"><a id="a87cbb10969eff63f8ae66afc4e9457eb"></a>
115-
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION</b>&#160;&#160;&#160;000501</td></tr>
115+
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION</b>&#160;&#160;&#160;000502</td></tr>
116116
<tr class="separator:a87cbb10969eff63f8ae66afc4e9457eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
117117
</table>
118118
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
119-
<div class="textblock"><p>Same as <a class="el" href="AUnit_8h_source.html">AUnit.h</a> except that the verbose versions of the various assertXxx() macros are provided. </p>
119+
<div class="textblock"><p>Same as <a class="el" href="AUnit_8h.html" title="Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided...">AUnit.h</a> except that the verbose versions of the various assertXxx() macros are provided. </p>
120120
<p>These capture the strings of the actual arguments in the assert macros and print more verbose and helpful messages in the same format used by ArduinoUnit. The cost is 20-25% increase in flash memory to hold those strings for medium to large unit tests. </p>
121121

122122
<p class="definition">Definition in file <a class="el" href="AUnitVerbose_8h_source.html">AUnitVerbose.h</a>.</p>

docs/html/AUnitVerbose_8h__incl.map

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<map id="/home/brian/dev/AUnit/src/AUnitVerbose.h" name="/home/brian/dev/AUnit/src/AUnitVerbose.h">
22
<area shape="rect" id="node2" href="$Verbosity_8h_source.html" title="aunit/Verbosity.h" alt="" coords="391,468,511,495"/>
3-
<area shape="rect" id="node4" href="$Compare_8h_source.html" title="aunit/Compare.h" alt="" coords="45,95,163,121"/>
3+
<area shape="rect" id="node4" href="$Compare_8h.html" title="This file provides overloaded compareXxx(a, b) functions which are used by the various assertXxx(a..." alt="" coords="45,95,163,121"/>
44
<area shape="rect" id="node6" href="$Printer_8h_source.html" title="aunit/Printer.h" alt="" coords="365,319,467,345"/>
55
<area shape="rect" id="node7" href="$Test_8h_source.html" title="aunit/Test.h" alt="" coords="439,393,529,420"/>
66
<area shape="rect" id="node9" href="$Assertion_8h_source.html" title="aunit/Assertion.h" alt="" coords="492,319,612,345"/>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
044106ba5bbe5761f934b018fc950f1a
1+
858797fb3625711c6104d1d0cd8ef91f

0 commit comments

Comments
 (0)