Testing and Code Coverage - AtesComp/miraclecast Wiki
Testing is a basic feature to asure code behave as expected. Miraclecast lacks most of it, but there's already some test
You need to install dependency check.
Compile as describe in [[Building]] and execute
$ make check
How much code is covered by test? Code coverage can answer that
You need to modify compilation to include coverage traces:
$ ./autogen.sh g --enable-gcov
Then you can compile and execute test $ make $ make check
To generate code coverage:
$ make lcov $ xdg-open miracle-lcov/index.html
Is that all the code covered? Well, not really. All executables are compiled to support code coverage, so if you run any of them:
miracle-dhcp, etc you will get more code coverage. That part needs to be automated and code coverage will increase, but a refactor needs to be done to isolate functionality and CLI.