μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Typedefs | Functions
test_class.cpp File Reference
#include <pybind11/stl.h>
#include "constructor_stats.h"
#include "local_bindings.h"
#include "pybind11_tests.h"
#include <utility>
Include dependency graph for test_class.cpp:

Go to the source code of this file.

Classes

struct  NoBraceInitialization
 
class  BreaksBase< N >
 
class  BreaksTramp< N >
 

Macros

#define CHECK_BASE(N)
 
#define CHECK_ALIAS(N)
 
#define CHECK_NOALIAS(N)
 
#define CHECK_HOLDER(N, TYPE)
 
#define CHECK_BROKEN(N)
 

Typedefs

using DoesntBreak1 = py::class_< BreaksBase< 1 >, std::unique_ptr< BreaksBase< 1 > >, BreaksTramp< 1 > >
 
using DoesntBreak2 = py::class_< BreaksBase< 2 >, BreaksTramp< 2 >, std::unique_ptr< BreaksBase< 2 > > >
 
using DoesntBreak3 = py::class_< BreaksBase< 3 >, std::unique_ptr< BreaksBase< 3 > > >
 
using DoesntBreak4 = py::class_< BreaksBase< 4 >, BreaksTramp< 4 > >
 
using DoesntBreak5 = py::class_< BreaksBase< 5 > >
 
using DoesntBreak6 = py::class_< BreaksBase< 6 >, std::shared_ptr< BreaksBase< 6 > >, BreaksTramp< 6 > >
 
using DoesntBreak7 = py::class_< BreaksBase< 7 >, BreaksTramp< 7 >, std::shared_ptr< BreaksBase< 7 > > >
 
using DoesntBreak8 = py::class_< BreaksBase< 8 >, std::shared_ptr< BreaksBase< 8 > > >
 

Functions

 TEST_SUBMODULE (class_, m)
 
 CHECK_BASE (1)
 
 CHECK_BASE (2)
 
 CHECK_BASE (3)
 
 CHECK_BASE (4)
 
 CHECK_BASE (5)
 
 CHECK_BASE (6)
 
 CHECK_BASE (7)
 
 CHECK_BASE (8)
 
 CHECK_ALIAS (1)
 
 CHECK_ALIAS (2)
 
 CHECK_NOALIAS (3)
 
 CHECK_ALIAS (4)
 
 CHECK_NOALIAS (5)
 
 CHECK_ALIAS (6)
 
 CHECK_ALIAS (7)
 
 CHECK_NOALIAS (8)
 
 CHECK_HOLDER (1, unique)
 
 CHECK_HOLDER (2, unique)
 
 CHECK_HOLDER (3, unique)
 
 CHECK_HOLDER (4, unique)
 
 CHECK_HOLDER (5, unique)
 
 CHECK_HOLDER (6, shared)
 
 CHECK_HOLDER (7, shared)
 
 CHECK_HOLDER (8, shared)
 

Macro Definition Documentation

◆ CHECK_ALIAS

#define CHECK_ALIAS (   N)
Value:
static_assert( \
DoesntBreak##N::has_alias \
&& std::is_same<typename DoesntBreak##N::type_alias, BreaksTramp<(N)>>::value, \
"DoesntBreak" #N " has wrong type_alias!")

Definition at line 561 of file test_class.cpp.

◆ CHECK_BASE

#define CHECK_BASE (   N)
Value:
static_assert(std::is_same<typename DoesntBreak##N::type, BreaksBase<(N)>>::value, \
"DoesntBreak" #N " has wrong type!")

Definition at line 550 of file test_class.cpp.

◆ CHECK_BROKEN

#define CHECK_BROKEN (   N)
Value:
static_assert(std::is_same<typename Breaks##N::type, BreaksBase<-(N)>>::value, \
"Breaks1 has wrong type!");

Definition at line 596 of file test_class.cpp.

◆ CHECK_HOLDER

#define CHECK_HOLDER (   N,
  TYPE 
)
Value:
static_assert(std::is_same<typename DoesntBreak##N::holder_type, \
std::TYPE##_ptr<BreaksBase<(N)>>>::value, \
"DoesntBreak" #N " has wrong holder_type!")

Definition at line 578 of file test_class.cpp.

◆ CHECK_NOALIAS

#define CHECK_NOALIAS (   N)
Value:
static_assert(!DoesntBreak##N::has_alias \
&& std::is_void<typename DoesntBreak##N::type_alias>::value, \
"DoesntBreak" #N " has type alias, but shouldn't!")

Definition at line 566 of file test_class.cpp.

Typedef Documentation

◆ DoesntBreak1

using DoesntBreak1 = py::class_<BreaksBase<1>, std::unique_ptr<BreaksBase<1> >, BreaksTramp<1> >

Definition at line 542 of file test_class.cpp.

◆ DoesntBreak2

using DoesntBreak2 = py::class_<BreaksBase<2>, BreaksTramp<2>, std::unique_ptr<BreaksBase<2> >>

Definition at line 543 of file test_class.cpp.

◆ DoesntBreak3

using DoesntBreak3 = py::class_<BreaksBase<3>, std::unique_ptr<BreaksBase<3> >>

Definition at line 544 of file test_class.cpp.

◆ DoesntBreak4

using DoesntBreak4 = py::class_<BreaksBase<4>, BreaksTramp<4> >

Definition at line 545 of file test_class.cpp.

◆ DoesntBreak5

using DoesntBreak5 = py::class_<BreaksBase<5> >

Definition at line 546 of file test_class.cpp.

◆ DoesntBreak6

using DoesntBreak6 = py::class_<BreaksBase<6>, std::shared_ptr<BreaksBase<6> >, BreaksTramp<6> >

Definition at line 547 of file test_class.cpp.

◆ DoesntBreak7

using DoesntBreak7 = py::class_<BreaksBase<7>, BreaksTramp<7>, std::shared_ptr<BreaksBase<7> >>

Definition at line 548 of file test_class.cpp.

◆ DoesntBreak8

using DoesntBreak8 = py::class_<BreaksBase<8>, std::shared_ptr<BreaksBase<8> >>

Definition at line 549 of file test_class.cpp.

Function Documentation

◆ CHECK_ALIAS() [1/5]

CHECK_ALIAS ( )

◆ CHECK_ALIAS() [2/5]

CHECK_ALIAS ( )

◆ CHECK_ALIAS() [3/5]

CHECK_ALIAS ( )

◆ CHECK_ALIAS() [4/5]

CHECK_ALIAS ( )

◆ CHECK_ALIAS() [5/5]

CHECK_ALIAS ( )

◆ CHECK_BASE() [1/8]

CHECK_BASE ( )

◆ CHECK_BASE() [2/8]

CHECK_BASE ( )

◆ CHECK_BASE() [3/8]

CHECK_BASE ( )

◆ CHECK_BASE() [4/8]

CHECK_BASE ( )

◆ CHECK_BASE() [5/8]

CHECK_BASE ( )

◆ CHECK_BASE() [6/8]

CHECK_BASE ( )

◆ CHECK_BASE() [7/8]

CHECK_BASE ( )

◆ CHECK_BASE() [8/8]

CHECK_BASE ( )

◆ CHECK_HOLDER() [1/8]

CHECK_HOLDER ( ,
unique   
)

◆ CHECK_HOLDER() [2/8]

CHECK_HOLDER ( ,
unique   
)

◆ CHECK_HOLDER() [3/8]

CHECK_HOLDER ( ,
unique   
)

◆ CHECK_HOLDER() [4/8]

CHECK_HOLDER ( ,
unique   
)

◆ CHECK_HOLDER() [5/8]

CHECK_HOLDER ( ,
unique   
)

◆ CHECK_HOLDER() [6/8]

CHECK_HOLDER ( ,
shared   
)

◆ CHECK_HOLDER() [7/8]

CHECK_HOLDER ( ,
shared   
)

◆ CHECK_HOLDER() [8/8]

CHECK_HOLDER ( ,
shared   
)

◆ CHECK_NOALIAS() [1/3]

CHECK_NOALIAS ( )

◆ CHECK_NOALIAS() [2/3]

CHECK_NOALIAS ( )

◆ CHECK_NOALIAS() [3/3]

CHECK_NOALIAS ( )

◆ TEST_SUBMODULE()

TEST_SUBMODULE ( class_  ,
 
)