fsfw/unittest/core/CatchRunner.cpp

32 lines
621 B
C++
Raw Normal View History

2020-10-20 17:11:23 +02:00
/**
* @file CatchSource.cpp
* @brief Source file to compile catch framework.
* @details All tests should be written in other files.
* For eclipse console output, install ANSI Escape in Console
* from the eclipse market place to get colored characters.
*/
#ifndef NO_UNIT_TEST_FRAMEWORK
#define CATCH_CONFIG_RUNNER
2020-10-29 12:23:27 +01:00
#include <catch2/catch.hpp>
#if CUSTOM_UNITTEST_RUNNER == 0
2020-10-20 17:11:23 +02:00
extern int customSetup();
int main( int argc, char* argv[] ) {
customSetup();
// Catch internal function call
int result = Catch::Session().run( argc, argv );
// global clean-up
return result;
}
2020-10-29 12:23:27 +01:00
#endif
2020-10-20 17:11:23 +02:00
#endif