This PR refactores the tests so they are built as part of the FSFW. This is done by adding Catch2 with the FetchContent directive. A future implementation might also use a system installation of Catch2 by first checking whether Catch2 can already be found as a package The custom configuration folder testcfg was moved from the user folder to the actual unittest folder. The tests can be built by setting the CMake FSFW_BUILD_UNITTESTS option to TRUE/ON. They are built with the static library and dropped inside the build folders fsfw directory.
25 lines
660 B
C++
25 lines
660 B
C++
#ifndef FSFW_CATCHFACTORY_H_
|
|
#define FSFW_CATCHFACTORY_H_
|
|
|
|
#include "tests/TestsConfig.h"
|
|
#include "fsfw/objectmanager/SystemObjectIF.h"
|
|
#include "fsfw/objectmanager/ObjectManager.h"
|
|
|
|
// TODO: It is possible to solve this more cleanly using a special class which
|
|
// is allowed to set the object IDs and has virtual functions.
|
|
#if FSFW_ADD_DEFAULT_FACTORY_FUNCTIONS == 1
|
|
|
|
namespace Factory {
|
|
/**
|
|
* @brief Creates all SystemObject elements which are persistent
|
|
* during execution.
|
|
*/
|
|
void produceFrameworkObjects(void* args);
|
|
void setStaticFrameworkObjectIds();
|
|
|
|
}
|
|
|
|
#endif /* FSFW_ADD_DEFAULT_FSFW_FACTORY == 1 */
|
|
|
|
#endif /* FSFW_CATCHFACTORY_H_ */
|