#if defined(PROJECT_ENABLE_BACKWARD_CPP)
#include "backward.hpp"
#endif // defined(PROJECT_ENABLE_BACKWARD_CPP)

#include "gtest/gtest.h"

#include "initialize.hpp"
#include "utils/config.hpp"

using namespace monitarr;

int PROJECT_TEST_RESULT{0};

auto main(int argc, char **argv) -> int {
#if defined(PROJECT_ENABLE_BACKWARD_CPP)
  static backward::SignalHandling sh;
#endif

  if (not monitarr::project_initialize()) {
    return -1;
  }

  ::testing::InitGoogleTest(&argc, argv);
  PROJECT_TEST_RESULT = RUN_ALL_TESTS();

  monitarr::project_cleanup();

  return PROJECT_TEST_RESULT;
}
