Skip to content
Snippets Groups Projects
Commit f37a905c authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[test.main] update info and exception switches

parent fec6eb50
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,13 @@ ...@@ -5,6 +5,13 @@
#include "config.h" #include "config.h"
#ifndef DUNE_STUFF_TEST_MAIN_CATCH_EXCEPTIONS
#define DUNE_STUFF_TEST_MAIN_CATCH_EXCEPTIONS 0
#endif
#ifndef DUNE_STUFF_TEST_MAIN_ENABLE_INFO_LOGGING
#define DUNE_STUFF_TEST_MAIN_ENABLE_INFO_LOGGING 0
#endif
#include <string> #include <string>
#include <vector> #include <vector>
#include <map> #include <map>
...@@ -54,7 +61,7 @@ std::vector<double> DUNE_DEPRECATED_MSG("Use the expectation macros of the gtest ...@@ -54,7 +61,7 @@ std::vector<double> DUNE_DEPRECATED_MSG("Use the expectation macros of the gtest
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
#ifdef DUNE_STUFF_TEST_MAIN_CATCH_EXCEPTIONS #if DUNE_STUFF_TEST_MAIN_CATCH_EXCEPTIONS
try { try {
#endif #endif
...@@ -67,7 +74,7 @@ int main(int argc, char** argv) ...@@ -67,7 +74,7 @@ int main(int argc, char** argv)
#endif #endif
DSC::Logger().create( DSC::Logger().create(
#ifdef DUNE_STUFF_TEST_MAIN_ENABLE_INFO_LOGGING #if DUNE_STUFF_TEST_MAIN_ENABLE_INFO_LOGGING
DSC::LOG_CONSOLE | DSC::LOG_INFO | DSC::LOG_ERROR DSC::LOG_CONSOLE | DSC::LOG_INFO | DSC::LOG_ERROR
#else #else
DSC::LOG_CONSOLE | DSC::LOG_ERROR DSC::LOG_CONSOLE | DSC::LOG_ERROR
...@@ -79,7 +86,7 @@ int main(int argc, char** argv) ...@@ -79,7 +86,7 @@ int main(int argc, char** argv)
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
#ifdef DUNE_STUFF_TEST_MAIN_CATCH_EXCEPTIONS #if DUNE_STUFF_TEST_MAIN_CATCH_EXCEPTIONS
} catch (Dune::Exception& e) { } catch (Dune::Exception& e) {
std::cerr << "\nDune reported error: " << e.what() << std::endl; std::cerr << "\nDune reported error: " << e.what() << std::endl;
std::abort(); std::abort();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment