Files
app-ethereum/tests/unit
Charles-Edouard de la Vergne 1ddd0e9671 Cleanup src_plugin_sdk directory
- No need to copy local files
- No need to keep local copy of 'etherum-plugin-sdk' files
- Select needed files directly from the Makefile
2024-04-15 13:55:48 +02:00
..
2024-04-15 13:55:46 +02:00

Unit tests

It is important to unit test your functions. This also allows you to document how your functions work. We use the library cmocka

Requirement

Don't worry, you don't necessarily need to install the cmocka library because the cmakelist automatically fetches the library

Add new test

Create new file into tests folder and follow this initiation

Now go to the CMakeLists.txt file and add your test with the specific file you want to test.

Usage

Build

The default rules of makefile will compile the tests and run them.

make

The coverage rule will launch the default rules and generate the coverage and you will be automatically redirected to the generated .html

make coverage

The clean rule will delete the folders and files generated

make clean