| //////////////////////////////////////////////////////////////////////////////// |
| // Keep this file empty, and implement unit tests in separate compilation units! |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| #define CATCH_CONFIG_RUNNER |
| #include <catch2/catch.hpp> |
| #include "base/init_google.h" |
| |
| #ifndef NDEBUG |
| #ifdef __linux__ |
| #include <fenv.h> |
| #endif |
| #endif |
| |
| #ifndef NDEBUG |
| #ifdef __linux__ |
| void beforeMain (void) __attribute__((constructor)); |
| void beforeMain (void) |
| { |
| feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); |
| } |
| #endif |
| #endif |
| |
| int main(int argc, char** argv) { |
| InitGoogle("", &argc, &argv, true); |
| return Catch::Session().run(argc, argv); |
| } |