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