Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AnyTests.cpp File Reference
#include <boost/test/data/test_case.hpp>
#include <boost/test/unit_test.hpp>
#include "Acts/Utilities/Any.hpp"
#include <any>
#include <array>
#include <cstddef>
#include <type_traits>
#include <utility>
+ Include dependency graph for AnyTests.cpp:

Go to the source code of this file.

Classes

struct  D
 
struct  D2
 
struct  D3
 
struct  LifecycleCounters
 
struct  Lifecycle< PADDING >
 
struct  Lifecycle< 0 >
 
struct  Lifecycle< PADDING >
 
struct  LifecycleHandle< PADDING >
 

Macros

#define CHECK_ANY_ALLOCATIONS()
 
#define checkCounters()
 
#define makeCounter(counter, n)
 
#define incCopyConstruct(n)   makeCounter(counters.nCopyConstruct, n)
 
#define incCopy(n)   makeCounter(counters.nCopy, n)
 
#define incMoveConstruct(n)   makeCounter(counters.nMoveConstruct, n)
 
#define incMove(n)   makeCounter(counters.nMove, n)
 
#define incDestroy(n)   makeCounter(counters.nDestroy, n)
 

Functions

 BOOST_AUTO_TEST_CASE (AnyConstructPrimitive)
 
 BOOST_AUTO_TEST_CASE (AnyAssignConstructEmpty)
 
 BOOST_AUTO_TEST_CASE (AnyConstructCustom)
 
 BOOST_AUTO_TEST_CASE (AnyConstructCustomInPlace)
 
 BOOST_AUTO_TEST_CASE (AnyMove)
 
 BOOST_AUTO_TEST_CASE (AnyCopy)
 
 BOOST_AUTO_TEST_CASE (AnyDestroy)
 
 BOOST_AUTO_TEST_CASE (AnyDestroyCopy)
 
 BOOST_AUTO_TEST_CASE (AnyDestroyInPlace)
 
 BOOST_AUTO_TEST_CASE (LeakCheck)
 
 BOOST_AUTO_TEST_CASE (LifeCycleSmall)
 
 BOOST_AUTO_TEST_CASE (LifeCycleHeap)
 

Macro Definition Documentation

#define CHECK_ANY_ALLOCATIONS ( )
Value:
do { \
} while (0)

Definition at line 28 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 28 of file AnyTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

#define checkCounters ( )
Value:
do { \
BOOST_REQUIRE_EQUAL(l.counters.nCopy, counters.nCopy); \
BOOST_REQUIRE_EQUAL(l.counters.nCopyConstruct, counters.nCopyConstruct); \
BOOST_REQUIRE_EQUAL(l.counters.nMove, counters.nMove); \
BOOST_REQUIRE_EQUAL(l.counters.nMoveConstruct, counters.nMoveConstruct); \
BOOST_REQUIRE_EQUAL(l.counters.nDestroy, counters.nDestroy); \
} while (0)

Definition at line 365 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 365 of file AnyTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

#define incCopy (   n)    makeCounter(counters.nCopy, n)

Definition at line 381 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 381 of file AnyTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

#define incCopyConstruct (   n)    makeCounter(counters.nCopyConstruct, n)

Definition at line 380 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 380 of file AnyTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

#define incDestroy (   n)    makeCounter(counters.nDestroy, n)

Definition at line 384 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 384 of file AnyTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

#define incMove (   n)    makeCounter(counters.nMove, n)

Definition at line 383 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 383 of file AnyTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

#define incMoveConstruct (   n)    makeCounter(counters.nMoveConstruct, n)

Definition at line 382 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 382 of file AnyTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

#define makeCounter (   counter,
  n 
)
Value:
do { \
counter += n; \
checkCounters(); \
} while (0)

Definition at line 374 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 374 of file AnyTests.cpp

Function Documentation

BOOST_AUTO_TEST_CASE ( AnyConstructPrimitive  )

Definition at line 35 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 35 of file AnyTests.cpp

References KFPMath::a, parse_cmake_options::begin, CHECK_ANY_ALLOCATIONS, end, and testSigmaEff::v.

BOOST_AUTO_TEST_CASE ( AnyAssignConstructEmpty  )

Definition at line 88 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 88 of file AnyTests.cpp

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, CHECK_ANY_ALLOCATIONS, and testing::internal::move().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( AnyConstructCustom  )

Definition at line 104 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 104 of file AnyTests.cpp

References KFPMath::a, A, CHECK_ANY_ALLOCATIONS, and value.

BOOST_AUTO_TEST_CASE ( AnyConstructCustomInPlace  )

Definition at line 121 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 121 of file AnyTests.cpp

References KFPMath::a, A, CHECK_ANY_ALLOCATIONS, testSigmaEff::v, and value.

BOOST_AUTO_TEST_CASE ( AnyMove  )

Definition at line 134 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 134 of file AnyTests.cpp

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, CHECK_ANY_ALLOCATIONS, testing::internal::move(), and testSigmaEff::v.

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( AnyCopy  )

Definition at line 157 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 157 of file AnyTests.cpp

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, CHECK_ANY_ALLOCATIONS, and testSigmaEff::v.

BOOST_AUTO_TEST_CASE ( AnyDestroy  )

Definition at line 194 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 194 of file AnyTests.cpp

References KFPMath::a, CHECK_ANY_ALLOCATIONS, and testing::internal::move().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( AnyDestroyCopy  )

Definition at line 220 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 220 of file AnyTests.cpp

References KFPMath::a, KFPMath::b, and CHECK_ANY_ALLOCATIONS.

BOOST_AUTO_TEST_CASE ( AnyDestroyInPlace  )

Definition at line 260 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 260 of file AnyTests.cpp

References KFPMath::a, and CHECK_ANY_ALLOCATIONS.

BOOST_AUTO_TEST_CASE ( LeakCheck  )

Definition at line 293 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 293 of file AnyTests.cpp

References KFPMath::a, CHECK_ANY_ALLOCATIONS, and i.

BOOST_AUTO_TEST_CASE ( LifeCycleSmall  )

Definition at line 386 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 386 of file AnyTests.cpp

References KFPMath::a, KFPMath::b, CHECK_ANY_ALLOCATIONS, checkCounters, counters, incCopy, incCopyConstruct, incDestroy, incMove, incMoveConstruct, LifecycleHandle< PADDING >::inner, and testing::internal::move().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( LifeCycleHeap  )

Definition at line 441 of file AnyTests.cpp.

View newest version in sPHENIX GitHub at line 441 of file AnyTests.cpp

References KFPMath::a, KFPMath::b, CHECK_ANY_ALLOCATIONS, checkCounters, counters, incCopy, incCopyConstruct, incDestroy, LifecycleHandle< PADDING >::inner, and testing::internal::move().

+ Here is the call graph for this function: