Tests can be created at the plugins level. Tests must:
Be located under the tests folder of a plugin folder (e.g., [OpenCOR]/src/plugins/miscellaneous/Compiler/tests/ for the Compiler plugin);
Consist of at least one set of .cpp and .h files (e.g., [OpenCOR]/src/plugins/miscellaneous/Compiler/tests/tests.cpp and [OpenCOR]/src/plugins/miscellaneous/Compiler/tests/tests.h for the Compiler plugin);
Be listed under the TESTS header in the call to our CMake add_plugin() macro of the plugin’s CMakeLists.txt file (e.g., [OpenCOR]/src/plugins/miscellaneous/Compiler/CMakeLists.txt for the Compiler plugin):
project(MyPlugin)
# Add the plugin
add_plugin(MyPlugin
...
TESTS
tests1
tests2
tests3
...
)
Some useful functions can be found under the main tests folder (see [OpenCOR]/src/tests/src/testsutils.cpp and [OpenCOR]/src/tests/src/testsutils.h).