PURIFY
Next-generation radio interferometric imaging
common_catch_main.cc
Go to the documentation of this file.
1 #define CATCH_CONFIG_RUNNER
2 
3 #include "purify/config.h"
4 #include <sopt/config.h>
5 #include <memory>
6 #include <random>
7 #include <catch2/catch_all.hpp>
8 #include "purify/logging.h"
9 #include <sopt/logging.h>
10 
11 std::unique_ptr<std::mt19937_64> mersenne(new std::mt19937_64(0));
12 
13 int main(int argc, char **argv) {
14  Catch::Session session; // There must be exactly once instance
15 
16  int returnCode = session.applyCommandLine(argc, const_cast<char **>(argv));
17  if (returnCode != 0) // Indicates a command line error
18  return returnCode;
19  mersenne.reset(new std::mt19937_64(session.configData().rngSeed));
20 
21  return session.run();
22 }
int main(int argc, char **argv)
std::unique_ptr< std::mt19937_64 > mersenne(new std::mt19937_64(0))