Files
fsfw/unittests/CatchRunner.cpp
T

27 lines
617 B
C++
Raw Normal View History

2020-10-20 17:11:23 +02:00
/**
2021-01-13 11:53:34 +01:00
* @file CatchRunner.cpp
2020-10-20 17:11:23 +02:00
* @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.
*/
2021-08-16 10:49:07 +02:00
#include "CatchRunner.h"
2020-10-20 17:11:23 +02:00
2021-01-13 11:53:34 +01:00
#define CATCH_CONFIG_COLOUR_WINDOWS
2020-10-29 12:23:27 +01:00
2021-01-13 11:53:34 +01:00
#include <catch2/catch_session.hpp>
2020-10-20 17:11:23 +02:00
extern int customSetup();
2022-07-25 22:22:08 +02:00
extern int customTeardown();
2020-10-20 17:11:23 +02:00
2021-10-07 13:24:46 +02:00
int main(int argc, char* argv[]) {
2022-02-02 10:29:30 +01:00
customSetup();
2020-10-20 17:11:23 +02:00
2022-02-02 10:29:30 +01:00
// Catch internal function call
int result = Catch::Session().run(argc, argv);
2020-10-20 17:11:23 +02:00
2022-02-02 10:29:30 +01:00
// global clean-up
2022-07-25 22:22:08 +02:00
customTeardown();
2022-02-02 10:29:30 +01:00
return result;
2020-10-20 17:11:23 +02:00
}