Skip to content

Commit

Permalink
Merge pull request #59 from bxparks/develop
Browse files Browse the repository at this point in the history
merge v1.3.3 into master
  • Loading branch information
bxparks authored Sep 15, 2020
2 parents cb26a9c + 8a97d84 commit f47bd08
Show file tree
Hide file tree
Showing 305 changed files with 9,067 additions and 5,550 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

* Unreleased
* 1.3.3 (2020-09-15)
* Increase maximum allowed `setTimeout()` from 255 seconds to 65535 seconds
(18.2 hours). (See [Issue
#57](https://github.com/bxparks/AUnit/issues/57)).
* 1.3.2 (2020-02-29)
* Fix typos in README.md. No functional change.
* 1.3.1 (2019-07-31)
Expand Down
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ tools to verify, upload and validate the unit tests to the microcontroller,
instead of having to go through the Arduino IDE. Both the AUniter and
UnixHostDuino tools can be used in a continuous integration system like Jenkins.

Version: 1.3.2 (2020-02-29)
**Version**: 1.3.3 (2020-09-15)

**Changelog**: [CHANGELOG.md](CHANGELOG.md).

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

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

The `TestRunner` in AUnit applies a time out value to all the test cases that it
runs. The default time out is 10 seconds. Currently, the
time out value is global to all test cases, individual test time out values
cannot be set independently. If a test does not finish before that time, then
the test is marked as `timed out` (internally implemented by the
runs. The default time out is 10 seconds. A timeout value of `0` means an
infinite timeout, which means that the `testing()` test case may run forever.
The value of the timeout is stored as a `uint16_t` type, so the maximum timeout
is 65535 seconds or a bit over 18 hours.

Currently, the time out value is global to all test cases, individual test time
out values cannot be set independently. If a test does not finish before that
time, then the test is marked as `timed out` (internally implemented by the
`Test::expire()` method) and a message is printed like this:
```
Test looping_until timed out.
Expand All @@ -1201,13 +1207,6 @@ void setup() {
}
```

A timeout value of `0` means an infinite timeout, which means that the
`testing()` test case may run forever. To conserve static memory, the value of
the timeout is stored as a single byte `uint8_t`, so the maximum timeout is 255
seconds or 4m15s. (It could be argued that a test taking longer than this is not
really a unit test but an integration test, and should probably use a different
framework, but let me know if you truly need a timeout of greater than 4m15s).

***ArduinoUnit Compatibility***: _Only available in AUnit._

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

* `ASSERT_EQ(e, a)` - `assertEqual()`
Expand Down Expand Up @@ -1419,7 +1418,7 @@ integer type.

### Testing Private Helper Methods

There is a school of throught which says that unit tests should test only the
There is a school of thought which says that unit tests should test only the
publically exposed methods of a class or library. I agree mostly with that
sentiment, but not rigidly. I think it is sometimes useful to write unit tests
for `protected` or `private` methods. For example, when creating a chain of
Expand Down Expand Up @@ -1533,10 +1532,6 @@ ESP8266 - ESP-01 (static) | 47356 | compile | 33128 |
Not all unit test sketches will experience a savings of 65% of flash memory with
AUnit, but a savings of 30-50% seems to be common.
## Changelog
See [CHANGELOG.md](CHANGELOG.md).
## System Requirements
### Tool Chain
Expand Down Expand Up @@ -1592,6 +1587,9 @@ incorporate everything, but I will give your ideas serious consideration.
* Created by Brian T. Park ([email protected]).
* The Google Test adapter (`gtest.h`) was created by Chris Johnson
([email protected]).
* @brewmanz increased the maximum allowed value of `TestRunner::setTimeout()`
from 255 seconds to 65535 seconds (18.2 hours). (See [Issue
#57](https://github.com/bxparks/AUnit/issues/57)).
* The design and syntax of many macros (e.g. `test()`, `assertXxx()`) were
borrowed from the [ArduinoUnit](https://github.com/mmurdoch/arduinounit)
project to allow AUnit to be almost a drop-in replacement. Many thanks to
Expand Down
5 changes: 5 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
html:
doxygen doxygen.cfg > /tmp/doxygen.out

clean:
rm -rf html
Loading

0 comments on commit f47bd08

Please sign in to comment.