LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art_ut.cc
Go to the documentation of this file.
1 #define BOOST_TEST_ALTERNATIVE_INIT_API
2 #undef BOOST_TEST_MAIN
3 #define BOOST_TEST_NO_MAIN
4 #include "cetlib/quiet_unit_test.hpp"
5 
7 
8 using namespace boost::unit_test;
9 
10 #include <cstdlib>
11 #include <cstring>
12 
13 //____________________________________________________________________________//
14 
15 void art_ut()
16 {
17  int app_return_val = artapp(framework::master_test_suite().argc,
18  framework::master_test_suite().argv);
19  BOOST_REQUIRE_EQUAL(app_return_val, 0);
20 }
21 
22 //____________________________________________________________________________//
23 
24 bool
26 {
27 // framework::master_test_suite().add(BOOST_TEST_CASE(&art_ut));
28  auto ts = BOOST_TEST_SUITE("art_ut");
29  ts->add(BOOST_TEST_CASE(&art_ut));
30  framework::master_test_suite().add(ts);
31  return true;
32 }
33 
34 int main(int argc, char *argv[]) {
35  char const *cmp = "-c";
36  char to[] = "--config";
37  for (int i = 0;
38  i < argc;
39  ++i) {
40  if (strncmp(cmp, argv[i], 2) == 0) {
41  argv[i] = to;
42  break; // Done.
43  }
44  }
45  return unit_test_main(&init_unit_test_suite, argc, argv);
46 }
47 
48 // Local Variables:
49 // mode: c++
50 // End:
void art_ut()
Definition: art_ut.cc:15
bool init_unit_test_suite()
Definition: art_ut.cc:25
int artapp(int argc, char *argv[])
Definition: artapp.cc:23
int main(int argc, char *argv[])
Definition: art_ut.cc:34