catch_main.cc
Go to the documentation of this file.
1 // vim: set sw=2 expandtab :
2 #define CATCH_CONFIG_RUNNER
3 #include "catch2/catch.hpp"
4 
8 
9 #include <string>
10 
11 using namespace std;
12 using namespace std::string_literals;
13 
14 int
15 main(int argc, char** argv)
16 {
17  Catch::Session session;
18  std::string fhiclConfigFileName;
19  using namespace Catch::clara;
20  // Our non-option argument, being non-optional, should be first.
21  auto cli = Arg(fhiclConfigFileName, "config.fcl")("<fhicl-config-file>") |
22  session.cli();
23 
24  session.cli(cli);
25 
26  int result = session.applyCommandLine(argc, argv);
27  if (result == 0) {
28  mf::SetIteration("JobSetup"s);
30  auto const msg_ps = fhicl::ParameterSet::make(fhiclConfigFileName, fpm);
32  result = session.run();
33  }
34  return (result < 0xff ? result : 0xff);
35 }
void SetIteration(string const &val)
static QCString result
std::string string
Definition: nybbler.cc:12
static ParameterSet make(intermediate_table const &tbl)
Definition: ParameterSet.cc:68
STL namespace.
def cli(ctx)
Definition: main.py:7
void StartMessageFacility(fhicl::ParameterSet const &pset, string const &applicationName)
def session(dburl="sqlite:///:memory:")
Definition: db.py:754
int main(int argc, char **argv)
Definition: catch_main.cc:15
static QCString * s
Definition: config.cpp:1042