catch2 running

This commit is contained in:
2022-02-10 18:15:33 +01:00
parent 50cf01376f
commit d9badee18f
5 changed files with 63 additions and 39 deletions

View File

@ -1,5 +1,6 @@
add_subdirectory(testcfg)
add_subdirectory(controller)
target_sources(${TARGET_NAME} PRIVATE
target_sources(${UNITTEST_NAME} PRIVATE
main.cpp
)

View File

@ -0,0 +1,3 @@
target_sources(${UNITTEST_NAME} PRIVATE
testThermalController.cpp
)

View File

@ -0,0 +1,7 @@
#include <catch2/catch_test_macros.hpp>
TEST_CASE( "Thermal Controller" , "[ThermalController]") {
bool test = true;
REQUIRE( test == true);
}

View File

@ -1,7 +1,15 @@
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
#include "fsfw_tests/unit/CatchRunner.h"
#include <stdio.h>
#include <catch2/catch_session.hpp>
int main(int argc, char* argv[]) {
// fsfwtest::customMain(argc, argv);
puts("unittests");
// Catch internal function call
int result = Catch::Session().run(argc, argv);
// global clean-up
return result;
}