Tests can be created at the plugin level. Every test must:
test
folder (e.g. [OpenCOR]/src/plugins/misc/Compiler/test
) of a plugin folder (e.g. [OpenCOR]/src/plugins/misc/Compiler
);.cpp
and .h
files (e.g. [OpenCOR]/src/plugins/misc/Compiler/test/test.cpp
and [OpenCOR]/src/plugins/misc/Compiler/test/test.h
);TESTS
header in the call to our CMake ADD_PLUGIN
macro of the plugin's CMakeLists.txt
file (e.g. [OpenCOR]/src/plugins/misc/Compiler/CMakeLists.txt
):
PROJECT(MyPlugin) # Add the plugin ADD_PLUGIN(MyPlugin ... TESTS test1 test2 test3 ... )
main test program
:
... // The different tests that are to be run Tests tests; ... tests["MyPlugin"] = QStringList() << "test1" << "test2" << "test3" << ...; ... ...