mirror of https://github.com/ARMmbed/mbed-os.git
c6312a3c70
In pursuit of increasing unit test coverage of Mbed OS, we add the boilerplate code for unit testing of AnalogIn.cpp and an empty test source file. This serves two purposes - it allows us to report on currently untested sources in code coverage data, and it makes it a little easier for developers to write unit tests for these sources. The 'empty' test file contains a main function that simply returns. This is required to allow CMake's add_executable() to be used to pull in the source file for the SUT, which ensures that this source file is built and therefore instrumented to generate coverage data. The alternative that was explored was to instead use Google Test's TEST() macro and prefix the test name with 'DISABLED_' to skip it, but that resulted in the test being reported as skipped, which was deemed undesireable for these 'empty' tests. |
||
---|---|---|
.. | ||
TESTS | ||
UNITTESTS | ||
.mbedignore |