Skip to content

Commit f4985bc

Browse files
authored
Merge pull request #47 from bxparks/develop
1.2.1 - support 64-bit integers in assert statements
2 parents ca0c6d9 + 88603d3 commit f4985bc

File tree

151 files changed

+2132
-248
lines changed

Some content is hidden

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

151 files changed

+2132
-248
lines changed

CHANGELOG.md

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

3+
* 1.2.1 (2018-12-22)
4+
* Add support for 64-bit integers (`long long` and `unsigned long long`)
5+
for various `assertXxx()` statements. Exceptions are: `assertNear()` and
6+
`assertNotNear()` which do not support 64-bit integers. This is considered
7+
a minor-point release (1.2.1 instead of 1.3) because the user-visible API
8+
does not change, just extends to 64-bit integer types.
9+
* Add `ASSERT_NEAR()` macro to `contrib/gtest.h` (thanks ciband@).
310
* 1.2 (2018-12-01)
411
* Add overloaded 2-argument versions of test() and testing() macros to match
512
the TEST() macro in Google Test which takes 2 arguments.

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AVR, ESP8266, ESP32 and Teensy platforms. The sister AUniter project provides
99
command line tools to verify, upload and validate the unit tests. The AUniter
1010
tools can be used in a continuous integration system like Jenkins.
1111

12-
Version: 1.2 (2018-12-01)
12+
Version: 1.2.1 (2018-12-22)
1313

1414
[![AUniter Jenkins Badge](https://us-central1-xparks2018.cloudfunctions.net/badge?project=AUnit)](https://github.com/bxparks/AUniter)
1515

@@ -99,6 +99,8 @@ Here are the features in AUnit which are not available in ArduinoUnit 2.2:
9999
* Approximate comparisons:
100100
* `assertNear()`
101101
* `asssertNotNear()`
102+
* Supports 64-bit integer
103+
* `assertXxx()` support both `long long` and `unsigned long long`
102104
* `test()` and `testing()` macros support both 1 and 2 arguments
103105
* `test(testName)` and `test(suiteName, testName)`
104106
* `testing(testName)` and `testing(suiteName, testName)`
@@ -411,7 +413,7 @@ are available. These are essentially identical to ArduinoUnit:
411413
#### Supported Parameter Types
412414
413415
The 6 core assert macros (assertEqual, assertNotEqual, assertLess, assertMore,
414-
assertLessOrEqual, assertMoreOrEqual) support the following 16
416+
assertLessOrEqual, assertMoreOrEqual) support the following 18
415417
combinations for their parameter types:
416418
417419
* `(bool, bool)`
@@ -420,6 +422,8 @@ combinations for their parameter types:
420422
* `(unsigned int, unsigned int)`
421423
* `(long, long)`
422424
* `(unsigned long, unsigned long)`
425+
* `(long long, long long)`
426+
* `(unsigned long long, unsigned long long)`
423427
* `(double, double)`
424428
* `(const char *, const char *)`
425429
* `(const char *, const String&)`
@@ -577,7 +581,8 @@ list of supported types is:
577581
* `double`
578582
579583
Other primitive types (e.g. `char` or `float`) will be automatically converted
580-
to one of these supported types by the compiler.
584+
to one of these supported types by the compiler. (64-bit integer types
585+
`long long` and `unsigned long long` are not supported here.)
581586
582587
Note that the `abs()` of 2 values of a signed integer type can be larger than
583588
the maximum value that can be represented by the given signed type. Since signed
@@ -1217,6 +1222,7 @@ their equivalent macros in AUnit:
12171222
* `ASSERT_STRCASENE(e, a)` - `assertStringCaseNotEqual()`
12181223
* `ASSERT_TRUE(x)` - `assertTrue()`
12191224
* `ASSERT_FALSE(x)` - `assertFalse()`
1225+
* `ASSERT_NEAR(e, a, error)` - `assertNear()`
12201226

12211227
To use the `gtest.h` adapter, include the following headers:
12221228
```C++

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 = 1.2
41+
PROJECT_NUMBER = 1.2.1
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: 19 additions & 17 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">1.2</span>
25+
&#160;<span id="projectnumber">1.2.1</span>
2626
</div>
2727
<div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
2828
</td>
@@ -73,7 +73,8 @@
7373

7474
<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>
76-
<div class="textblock"><code>#include &quot;aunit/Verbosity.h&quot;</code><br />
76+
<div class="textblock"><code>#include &quot;<a class="el" href="print64_8h_source.html">aunit/print64.h</a>&quot;</code><br />
77+
<code>#include &quot;aunit/Verbosity.h&quot;</code><br />
7778
<code>#include &quot;<a class="el" href="Compare_8h_source.html">aunit/Compare.h</a>&quot;</code><br />
7879
<code>#include &quot;aunit/Printer.h&quot;</code><br />
7980
<code>#include &quot;aunit/Test.h&quot;</code><br />
@@ -90,20 +91,21 @@
9091
<div class="dyncontent">
9192
<div class="center"><img src="AUnitVerbose_8h__incl.png" border="0" usemap="#_2home_2brian_2dev_2AUnit_2src_2AUnitVerbose_8h" alt=""/></div>
9293
<map name="_2home_2brian_2dev_2AUnit_2src_2AUnitVerbose_8h" id="_2home_2brian_2dev_2AUnit_2src_2AUnitVerbose_8h">
93-
<area shape="rect" id="node2" href="Verbosity_8h_source.html" title="aunit/Verbosity.h" alt="" coords="922,468,1042,495"/>
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="5,244,124,271"/>
95-
<area shape="rect" id="node6" href="Printer_8h_source.html" title="aunit/Printer.h" alt="" coords="251,319,353,345"/>
96-
<area shape="rect" id="node7" href="Test_8h_source.html" title="aunit/Test.h" alt="" coords="914,393,1005,420"/>
97-
<area shape="rect" id="node9" href="Assertion_8h_source.html" title="aunit/Assertion.h" alt="" coords="727,319,847,345"/>
98-
<area shape="rect" id="node11" href="MetaAssertion_8h_source.html" title="aunit/MetaAssertion.h" alt="" coords="301,244,450,271"/>
99-
<area shape="rect" id="node12" href="TestOnce_8h_source.html" title="aunit/TestOnce.h" alt="" coords="229,169,351,196"/>
100-
<area shape="rect" id="node13" href="TestAgain_8h_source.html" title="aunit/TestAgain.h" alt="" coords="427,169,551,196"/>
101-
<area shape="rect" id="node14" href="TestRunner_8h_source.html" title="aunit/TestRunner.h" alt="" coords="922,319,1055,345"/>
102-
<area shape="rect" id="node15" href="AssertVerboseMacros_8h.html" title="Verbose versions of the macros in AssertMacros.h. " alt="" coords="981,95,1175,121"/>
103-
<area shape="rect" id="node16" href="MetaAssertMacros_8h.html" title="Various assertTestXxx(), checkTestXxx(), assertTestXxxF() and checkTestXxxF() macros are defined in t..." alt="" coords="801,244,976,271"/>
104-
<area shape="rect" id="node17" href="TestMacros_8h.html" title="Various macros (test(), testF(), testing(), testingF(), externTest(), externTestF(), externTesting(), externTestingF()) are defined in this header. " alt="" coords="572,95,707,121"/>
105-
<area shape="rect" id="node8" href="FCString_8h_source.html" title="FCString.h" alt="" coords="445,468,530,495"/>
106-
<area shape="rect" id="node10" href="Flash_8h.html" title="Various macros to smooth over the differences among the various platforms with regards to their suppo..." alt="" coords="731,393,796,420"/>
94+
<area shape="rect" id="node2" href="print64_8h.html" title="Helper routines to print &#39;long long&#39; and &#39;unsigned long long&#39; because the Print::print() methods in P..." alt="" coords="51,95,155,121"/>
95+
<area shape="rect" id="node5" href="Verbosity_8h_source.html" title="aunit/Verbosity.h" alt="" coords="858,468,978,495"/>
96+
<area shape="rect" id="node7" href="Compare_8h.html" title="This file provides overloaded compareXxx(a, b) functions which are used by the various assertXxx(a..." alt="" coords="141,244,260,271"/>
97+
<area shape="rect" id="node8" href="Printer_8h_source.html" title="aunit/Printer.h" alt="" coords="208,319,311,345"/>
98+
<area shape="rect" id="node9" href="Test_8h_source.html" title="aunit/Test.h" alt="" coords="1071,393,1162,420"/>
99+
<area shape="rect" id="node11" href="Assertion_8h_source.html" title="aunit/Assertion.h" alt="" coords="1057,319,1177,345"/>
100+
<area shape="rect" id="node13" href="MetaAssertion_8h_source.html" title="aunit/MetaAssertion.h" alt="" coords="437,244,586,271"/>
101+
<area shape="rect" id="node14" href="TestOnce_8h_source.html" title="aunit/TestOnce.h" alt="" coords="351,169,474,196"/>
102+
<area shape="rect" id="node15" href="TestAgain_8h_source.html" title="aunit/TestAgain.h" alt="" coords="549,169,673,196"/>
103+
<area shape="rect" id="node16" href="TestRunner_8h_source.html" title="aunit/TestRunner.h" alt="" coords="1346,319,1479,345"/>
104+
<area shape="rect" id="node17" href="AssertVerboseMacros_8h.html" title="Verbose versions of the macros in AssertMacros.h. " alt="" coords="1103,95,1298,121"/>
105+
<area shape="rect" id="node18" href="MetaAssertMacros_8h.html" title="Various assertTestXxx(), checkTestXxx(), assertTestXxxF() and checkTestXxxF() macros are defined in t..." alt="" coords="1003,244,1177,271"/>
106+
<area shape="rect" id="node19" href="TestMacros_8h.html" title="Various macros (test(), testF(), testing(), testingF(), externTest(), externTestF(), externTesting(), externTestingF()) are defined in this header. " alt="" coords="683,95,817,121"/>
107+
<area shape="rect" id="node10" href="FCString_8h_source.html" title="FCString.h" alt="" coords="581,468,666,495"/>
108+
<area shape="rect" id="node12" href="Flash_8h.html" title="Various macros to smooth over the differences among the various platforms with regards to their suppo..." alt="" coords="981,393,1047,420"/>
107109
</map>
108110
</div>
109111
</div>
@@ -112,7 +114,7 @@
112114
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
113115
Macros</h2></td></tr>
114116
<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;010200</td></tr>
117+
#define&#160;</td><td class="memItemRight" valign="bottom"><b>AUNIT_VERSION</b>&#160;&#160;&#160;010201</td></tr>
116118
<tr class="separator:a87cbb10969eff63f8ae66afc4e9457eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
117119
</table>
118120
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<map id="/home/brian/dev/AUnit/src/AUnitVerbose.h" name="/home/brian/dev/AUnit/src/AUnitVerbose.h">
2-
<area shape="rect" id="node2" href="$Verbosity_8h_source.html" title="aunit/Verbosity.h" alt="" coords="922,468,1042,495"/>
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="5,244,124,271"/>
4-
<area shape="rect" id="node6" href="$Printer_8h_source.html" title="aunit/Printer.h" alt="" coords="251,319,353,345"/>
5-
<area shape="rect" id="node7" href="$Test_8h_source.html" title="aunit/Test.h" alt="" coords="914,393,1005,420"/>
6-
<area shape="rect" id="node9" href="$Assertion_8h_source.html" title="aunit/Assertion.h" alt="" coords="727,319,847,345"/>
7-
<area shape="rect" id="node11" href="$MetaAssertion_8h_source.html" title="aunit/MetaAssertion.h" alt="" coords="301,244,450,271"/>
8-
<area shape="rect" id="node12" href="$TestOnce_8h_source.html" title="aunit/TestOnce.h" alt="" coords="229,169,351,196"/>
9-
<area shape="rect" id="node13" href="$TestAgain_8h_source.html" title="aunit/TestAgain.h" alt="" coords="427,169,551,196"/>
10-
<area shape="rect" id="node14" href="$TestRunner_8h_source.html" title="aunit/TestRunner.h" alt="" coords="922,319,1055,345"/>
11-
<area shape="rect" id="node15" href="$AssertVerboseMacros_8h.html" title="Verbose versions of the macros in AssertMacros.h. " alt="" coords="981,95,1175,121"/>
12-
<area shape="rect" id="node16" href="$MetaAssertMacros_8h.html" title="Various assertTestXxx(), checkTestXxx(), assertTestXxxF() and checkTestXxxF() macros are defined in t..." alt="" coords="801,244,976,271"/>
13-
<area shape="rect" id="node17" href="$TestMacros_8h.html" title="Various macros (test(), testF(), testing(), testingF(), externTest(), externTestF(), externTesting(), externTestingF()) are defined in this header. " alt="" coords="572,95,707,121"/>
14-
<area shape="rect" id="node8" href="$FCString_8h_source.html" title="FCString.h" alt="" coords="445,468,530,495"/>
15-
<area shape="rect" id="node10" href="$Flash_8h.html" title="Various macros to smooth over the differences among the various platforms with regards to their suppo..." alt="" coords="731,393,796,420"/>
2+
<area shape="rect" id="node2" href="$print64_8h.html" title="Helper routines to print &#39;long long&#39; and &#39;unsigned long long&#39; because the Print::print() methods in P..." alt="" coords="51,95,155,121"/>
3+
<area shape="rect" id="node5" href="$Verbosity_8h_source.html" title="aunit/Verbosity.h" alt="" coords="858,468,978,495"/>
4+
<area shape="rect" id="node7" href="$Compare_8h.html" title="This file provides overloaded compareXxx(a, b) functions which are used by the various assertXxx(a..." alt="" coords="141,244,260,271"/>
5+
<area shape="rect" id="node8" href="$Printer_8h_source.html" title="aunit/Printer.h" alt="" coords="208,319,311,345"/>
6+
<area shape="rect" id="node9" href="$Test_8h_source.html" title="aunit/Test.h" alt="" coords="1071,393,1162,420"/>
7+
<area shape="rect" id="node11" href="$Assertion_8h_source.html" title="aunit/Assertion.h" alt="" coords="1057,319,1177,345"/>
8+
<area shape="rect" id="node13" href="$MetaAssertion_8h_source.html" title="aunit/MetaAssertion.h" alt="" coords="437,244,586,271"/>
9+
<area shape="rect" id="node14" href="$TestOnce_8h_source.html" title="aunit/TestOnce.h" alt="" coords="351,169,474,196"/>
10+
<area shape="rect" id="node15" href="$TestAgain_8h_source.html" title="aunit/TestAgain.h" alt="" coords="549,169,673,196"/>
11+
<area shape="rect" id="node16" href="$TestRunner_8h_source.html" title="aunit/TestRunner.h" alt="" coords="1346,319,1479,345"/>
12+
<area shape="rect" id="node17" href="$AssertVerboseMacros_8h.html" title="Verbose versions of the macros in AssertMacros.h. " alt="" coords="1103,95,1298,121"/>
13+
<area shape="rect" id="node18" href="$MetaAssertMacros_8h.html" title="Various assertTestXxx(), checkTestXxx(), assertTestXxxF() and checkTestXxxF() macros are defined in t..." alt="" coords="1003,244,1177,271"/>
14+
<area shape="rect" id="node19" href="$TestMacros_8h.html" title="Various macros (test(), testF(), testing(), testingF(), externTest(), externTestF(), externTesting(), externTestingF()) are defined in this header. " alt="" coords="683,95,817,121"/>
15+
<area shape="rect" id="node10" href="$FCString_8h_source.html" title="FCString.h" alt="" coords="581,468,666,495"/>
16+
<area shape="rect" id="node12" href="$Flash_8h.html" title="Various macros to smooth over the differences among the various platforms with regards to their suppo..." alt="" coords="981,393,1047,420"/>
1617
</map>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
532d6c15294b5e9fe7e5c453d04d9b25
1+
47a15b7e98586a9ab2960946b35b7c72
12.7 KB
Loading

0 commit comments

Comments
 (0)