LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art_ut.cc File Reference
#include "boost/test/unit_test.hpp"
#include "art/Framework/Art/artapp.h"
#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 2 of file art_ut.cc.

#define BOOST_TEST_NO_MAIN

Definition at line 4 of file art_ut.cc.

Function Documentation

void art_ut ( )

Definition at line 14 of file art_ut.cc.

References artapp().

Referenced by init_unit_test_suite().

15 {
16  int app_return_val = artapp(framework::master_test_suite().argc,
17  framework::master_test_suite().argv,
18  true);
19  BOOST_REQUIRE_EQUAL(app_return_val, 0);
20 }
int artapp(int argc, char *argv[], bool report_unused)
Definition: artapp.cc:26
bool init_unit_test_suite ( )

Definition at line 23 of file art_ut.cc.

References art_ut().

Referenced by main().

24 {
25  // framework::master_test_suite().add(BOOST_TEST_CASE(&art_ut));
26  auto ts = BOOST_TEST_SUITE("art_ut");
27  ts->add(BOOST_TEST_CASE(&art_ut));
28  framework::master_test_suite().add(ts);
29  return true;
30 }
void art_ut()
Definition: art_ut.cc:14
int main ( int  argc,
char *  argv[] 
)

Definition at line 33 of file art_ut.cc.

References init_unit_test_suite().

34 {
35  char const* cmp = "-c";
36  char to[] = "--config";
37  for (int i = 0; i < argc; ++i) {
38  if (strncmp(cmp, argv[i], 2) == 0) {
39  argv[i] = to;
40  break;
41  }
42  }
43  return unit_test_main(&init_unit_test_suite, argc, argv);
44 }
bool init_unit_test_suite()
Definition: art_ut.cc:23