Classes | Macros | Functions
DebugUtils_test.cc File Reference

Unit test for some of the utilities in DebugUtils.h. More...

#include <boost/test/unit_test.hpp>
#include "larcorealg/CoreUtils/DebugUtils.h"
#include <type_traits>
#include <array>

Go to the source code of this file.

Classes

struct  OurClass< Coll >
 

Macros

#define BOOST_TEST_MODULE   ( DebugUtils_test )
 

Functions

void static_assert_on_test ()
 
 BOOST_AUTO_TEST_CASE (ReferencesTestCase)
 

Detailed Description

Unit test for some of the utilities in DebugUtils.h.

Author
Gianluca Petrillo (petri.nosp@m.llo@.nosp@m.fnal..nosp@m.gov)
Date
March 22, 2019
See also
larcorealg/CoreUtils/DebugUtils.h

Test of backtrace print functions is on its own: printBacktrace_test.cc.

Definition in file DebugUtils_test.cc.

Macro Definition Documentation

#define BOOST_TEST_MODULE   ( DebugUtils_test )

Definition at line 12 of file DebugUtils_test.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( ReferencesTestCase  )

Definition at line 68 of file DebugUtils_test.cc.

68  {
69 
71 
72 } // BOOST_AUTO_TEST_CASE(ReferencesTestCase)
void static_assert_on_test()
void static_assert_on_test ( )

Definition at line 53 of file DebugUtils_test.cc.

53  {
54 
55  // this should never trigger a static assertion failure:
56  (void) OurClass<std::unique_ptr<double>>();
57 
58  // this triggers a static assertion failure (#if 1, which we disabled)
59 #if 0
60  (void) OurClass<std::unique_ptr<int[10]> const>();
61 #endif
62 
63 } // static_assert_on_test()