LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
lar_ut.cc File Reference
#include "cetlib/quiet_unit_test.hpp"
#include "art/Framework/Art/artapp.h"
#include <cstdlib>
#include <cstring>

Go to the source code of this file.

Macros

#define BOOST_TEST_ALTERNATIVE_INIT_API
 
#define BOOST_TEST_NO_MAIN
 

Functions

void art_ut ()
 
bool init_unit_test_suite ()
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

#define BOOST_TEST_ALTERNATIVE_INIT_API

Definition at line 1 of file lar_ut.cc.

#define BOOST_TEST_NO_MAIN

Definition at line 3 of file lar_ut.cc.

Function Documentation

void art_ut ( )

Definition at line 15 of file lar_ut.cc.

References artapp().

Referenced by init_unit_test_suite().

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 }
int artapp(int argc, char *argv[])
Definition: artapp.cc:23
bool init_unit_test_suite ( )

Definition at line 25 of file lar_ut.cc.

References art_ut().

Referenced by main().

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 }
void art_ut()
Definition: lar_ut.cc:15
int main ( int  argc,
char *  argv[] 
)

Definition at line 34 of file lar_ut.cc.

References init_unit_test_suite().

34  {
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 }
bool init_unit_test_suite()
Definition: lar_ut.cc:25