Skip to content

Commit f47bd08

Browse files
authored
Merge pull request #59 from bxparks/develop
merge v1.3.3 into master
2 parents cb26a9c + 8a97d84 commit f47bd08

File tree

305 files changed

+9067
-5550
lines changed

Some content is hidden

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

305 files changed

+9067
-5550
lines changed

CHANGELOG.md

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

33
* Unreleased
4+
* 1.3.3 (2020-09-15)
5+
* Increase maximum allowed `setTimeout()` from 255 seconds to 65535 seconds
6+
(18.2 hours). (See [Issue
7+
#57](https://github.com/bxparks/AUnit/issues/57)).
48
* 1.3.2 (2020-02-29)
59
* Fix typos in README.md. No functional change.
610
* 1.3.1 (2019-07-31)

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ tools to verify, upload and validate the unit tests to the microcontroller,
1717
instead of having to go through the Arduino IDE. Both the AUniter and
1818
UnixHostDuino tools can be used in a continuous integration system like Jenkins.
1919

20-
Version: 1.3.2 (2020-02-29)
20+
**Version**: 1.3.3 (2020-09-15)
21+
22+
**Changelog**: [CHANGELOG.md](CHANGELOG.md).
2123

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

@@ -1181,10 +1183,14 @@ which accidentally runs forever because the code forgets to call an explicit
11811183
`pass()`, `fail()` or `skip()`.
11821184

11831185
The `TestRunner` in AUnit applies a time out value to all the test cases that it
1184-
runs. The default time out is 10 seconds. Currently, the
1185-
time out value is global to all test cases, individual test time out values
1186-
cannot be set independently. If a test does not finish before that time, then
1187-
the test is marked as `timed out` (internally implemented by the
1186+
runs. The default time out is 10 seconds. A timeout value of `0` means an
1187+
infinite timeout, which means that the `testing()` test case may run forever.
1188+
The value of the timeout is stored as a `uint16_t` type, so the maximum timeout
1189+
is 65535 seconds or a bit over 18 hours.
1190+
1191+
Currently, the time out value is global to all test cases, individual test time
1192+
out values cannot be set independently. If a test does not finish before that
1193+
time, then the test is marked as `timed out` (internally implemented by the
11881194
`Test::expire()` method) and a message is printed like this:
11891195
```
11901196
Test looping_until timed out.
@@ -1201,13 +1207,6 @@ void setup() {
12011207
}
12021208
```
12031209

1204-
A timeout value of `0` means an infinite timeout, which means that the
1205-
`testing()` test case may run forever. To conserve static memory, the value of
1206-
the timeout is stored as a single byte `uint8_t`, so the maximum timeout is 255
1207-
seconds or 4m15s. (It could be argued that a test taking longer than this is not
1208-
really a unit test but an integration test, and should probably use a different
1209-
framework, but let me know if you truly need a timeout of greater than 4m15s).
1210-
12111210
***ArduinoUnit Compatibility***: _Only available in AUnit._
12121211

12131212
## GoogleTest Adapter
@@ -1216,7 +1215,7 @@ It may be possible to run simple unit tests written using
12161215
[Google Test](https://github.com/google/googletest/) API on an Arduino platform
12171216
by using the
12181217
[aunit/contrib/gtest.h](src/aunit/contrib/gtest.h) adapter. This
1219-
adapter layer provides a number of macros Google Test macros which map to
1218+
adapter layer provides a number of Google Test macros which map to
12201219
their equivalent macros in AUnit:
12211220

12221221
* `ASSERT_EQ(e, a)` - `assertEqual()`
@@ -1419,7 +1418,7 @@ integer type.
14191418

14201419
### Testing Private Helper Methods
14211420

1422-
There is a school of throught which says that unit tests should test only the
1421+
There is a school of thought which says that unit tests should test only the
14231422
publically exposed methods of a class or library. I agree mostly with that
14241423
sentiment, but not rigidly. I think it is sometimes useful to write unit tests
14251424
for `protected` or `private` methods. For example, when creating a chain of
@@ -1533,10 +1532,6 @@ ESP8266 - ESP-01 (static) | 47356 | compile | 33128 |
15331532
Not all unit test sketches will experience a savings of 65% of flash memory with
15341533
AUnit, but a savings of 30-50% seems to be common.
15351534
1536-
## Changelog
1537-
1538-
See [CHANGELOG.md](CHANGELOG.md).
1539-
15401535
## System Requirements
15411536
15421537
### Tool Chain
@@ -1592,6 +1587,9 @@ incorporate everything, but I will give your ideas serious consideration.
15921587
* Created by Brian T. Park ([email protected]).
15931588
* The Google Test adapter (`gtest.h`) was created by Chris Johnson
15941589
1590+
* @brewmanz increased the maximum allowed value of `TestRunner::setTimeout()`
1591+
from 255 seconds to 65535 seconds (18.2 hours). (See [Issue
1592+
#57](https://github.com/bxparks/AUnit/issues/57)).
15951593
* The design and syntax of many macros (e.g. `test()`, `assertXxx()`) were
15961594
borrowed from the [ArduinoUnit](https://github.com/mmurdoch/arduinounit)
15971595
project to allow AUnit to be almost a drop-in replacement. Many thanks to

docs/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
html:
2+
doxygen doxygen.cfg > /tmp/doxygen.out
3+
4+
clean:
5+
rm -rf html

0 commit comments

Comments
 (0)