Macros | Functions
UncopiableAndUnmovableClass_test.cc File Reference
#include "larcorealg/CoreUtils/UncopiableAndUnmovableClass.h"
#include <boost/test/unit_test.hpp>
#include <type_traits>

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   ( UncopiableAndUnmovableClass_test )
 

Functions

 BOOST_AUTO_TEST_CASE (UncopiableAndUnmovableClassTest)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   ( UncopiableAndUnmovableClass_test )

Definition at line 19 of file UncopiableAndUnmovableClass_test.cc.

Function Documentation

BOOST_AUTO_TEST_CASE ( UncopiableAndUnmovableClassTest  )

Definition at line 55 of file UncopiableAndUnmovableClass_test.cc.

55  {
56 
57  // check lar::UncopiableAndUnmovableClass class itself
58  BOOST_TEST
60  BOOST_TEST
62  BOOST_TEST
64  BOOST_TEST
66 
67 
68  // check a class derived from lar::UncopiableAndUnmovableClass class
69  struct Derived: protected lar::UncopiableAndUnmovableClass {};
70 
75 
76 
77  // check a class derived from lar::UncopiableAndUnmovableClass class
78  // and made movable
79  struct MovableDerived: protected lar::UncopiableAndUnmovableClass {
80  MovableDerived(MovableDerived&&):
81  lar::UncopiableAndUnmovableClass() {}
82  };
83 
88 
89 
90  // check a class derived from lar::UncopiableAndUnmovableClass class
91  // and made both copy- and move-assignable
92  struct AssignableDerived: protected lar::UncopiableAndUnmovableClass {
93  AssignableDerived& operator=(AssignableDerived const&) { return *this; }
94  AssignableDerived& operator=(AssignableDerived&&) { return *this; }
95  };
96 
101 
102 } // BOOST_AUTO_TEST_CASE(UncopiableAndUnmovableClassTest)
An empty class that can&#39;t be copied nor moved.
LArSoft-specific namespace.