fsfw/src/fsfw_tests/internal/InternalUnitTester.h

34 lines
952 B
C
Raw Permalink Normal View History

2020-10-20 17:11:23 +02:00
#ifndef FRAMEWORK_TEST_UNITTESTCLASS_H_
#define FRAMEWORK_TEST_UNITTESTCLASS_H_
2020-10-29 17:22:41 +01:00
#include "UnittDefinitions.h"
2022-08-16 12:48:22 +02:00
#include "fsfw/returnvalues/returnvalue.h"
2020-10-20 17:11:23 +02:00
/**
* @brief Can be used for internal testing, for example for hardware specific
* tests which can not be run on a host-machine.
*
* TODO: A lot of ways to improve this class. A way for tests to subscribe
* in this central class would be nice. Right now, this is the class
* which simply calls all other tests from other files manually.
* Maybe there is a better way..
*/
2022-08-15 20:28:16 +02:00
class InternalUnitTester {
2022-02-02 10:29:30 +01:00
public:
struct TestConfig {
bool testArrayPrinter = false;
bool testSemaphores = true;
};
2021-01-15 17:06:05 +01:00
2022-02-02 10:29:30 +01:00
InternalUnitTester();
virtual ~InternalUnitTester();
2020-10-20 17:11:23 +02:00
2022-02-02 10:29:30 +01:00
/**
* Some function which calls all other tests
* @return
*/
virtual ReturnValue_t performTests(const struct InternalUnitTester::TestConfig& testConfig);
2020-10-20 17:11:23 +02:00
};
#endif /* FRAMEWORK_TEST_UNITTESTCLASS_H_ */