Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
lib::test Namespace Reference

Description

Unit tests for the Lumiera support library.

Namespaces

namespace  anonymous_namespace{allocation-cluster-test.cpp}
 
namespace  anonymous_namespace{builder-qualifier-support-test.cpp}
 
namespace  anonymous_namespace{call-queue-test.cpp}
 
namespace  anonymous_namespace{del-stash-test.cpp}
 
namespace  anonymous_namespace{dependency-configuration-test.cpp}
 
namespace  anonymous_namespace{dependency-factory-test.cpp}
 
namespace  anonymous_namespace{diagnostic-context-test.cpp}
 
namespace  anonymous_namespace{event-log.cpp}
 
namespace  anonymous_namespace{event-log.hpp}
 
namespace  anonymous_namespace{incidence-count-test.cpp}
 
namespace  anonymous_namespace{index-iter-test.cpp}
 
namespace  anonymous_namespace{iter-adapter-test.cpp}
 
namespace  anonymous_namespace{iter-core-adapter-test.cpp}
 
namespace  anonymous_namespace{iter-cursor-test.cpp}
 
namespace  anonymous_namespace{iter-explorer-test.cpp}
 
namespace  anonymous_namespace{iter-source-test.cpp}
 
namespace  anonymous_namespace{iter-zip-test.cpp}
 
namespace  anonymous_namespace{itertools-test.cpp}
 
namespace  anonymous_namespace{linked-elements-test.cpp}
 
namespace  anonymous_namespace{microbenchmark.hpp}
 
namespace  anonymous_namespace{multifact-argument-test.cpp}
 
namespace  anonymous_namespace{multifact-singleton-test.cpp}
 
namespace  anonymous_namespace{multifact-test.cpp}
 
namespace  anonymous_namespace{null-value-test.cpp}
 
namespace  anonymous_namespace{opaque-holder-test.cpp}
 
namespace  anonymous_namespace{opaque-unchecked-buffer-test.cpp}
 
namespace  anonymous_namespace{polymorphic-value-test.cpp}
 
namespace  anonymous_namespace{query-text-test.cpp}
 
namespace  anonymous_namespace{random-concurrent-test.cpp}
 
namespace  anonymous_namespace{random-draw-test.cpp}
 
namespace  anonymous_namespace{result-test.cpp}
 
namespace  anonymous_namespace{scoped-collection-test.cpp}
 
namespace  anonymous_namespace{several-builder-test.cpp}
 
namespace  anonymous_namespace{split-splice-test.cpp}
 
namespace  anonymous_namespace{symbol-hashtable-test.cpp}
 
namespace  anonymous_namespace{sync-barrier-performance-test.cpp}
 
namespace  anonymous_namespace{sync-barrier-test.cpp}
 
namespace  anonymous_namespace{sync-classlock-test.cpp}
 
namespace  anonymous_namespace{sync-locking-test.cpp}
 
namespace  anonymous_namespace{sync-timedwait-test.cpp}
 
namespace  anonymous_namespace{sync-waiting-test.cpp}
 
namespace  anonymous_namespace{temp-dir.hpp}
 
namespace  anonymous_namespace{test-helper.hpp}
 
namespace  anonymous_namespace{thread-wrapper-join-test.cpp}
 
namespace  anonymous_namespace{thread-wrapper-lifecycle-test.cpp}
 
namespace  anonymous_namespace{thread-wrapper-test.cpp}
 
namespace  anonymous_namespace{tracking-allocator.cpp}
 
namespace  anonymous_namespace{tracking-allocator.hpp}
 
namespace  anonymous_namespace{typed-allocation-manager-test.cpp}
 
namespace  anonymous_namespace{typed-counter-test.cpp}
 
namespace  anonymous_namespace{unique-malloc-owner-test.cpp}
 
namespace  anonymous_namespace{verb-function-dispatch-test.cpp}
 
namespace  anonymous_namespace{verb-visitor-dispatch-test.cpp}
 
namespace  microbenchmark
 
namespace  test
 

Typedefs

typedef std::vector< int > VecI
 
typedef std::map< int, int > MapII
 
typedef std::multimap< int, int > MMapII
 
typedef std::unordered_map< int, int > HMapII
 
typedef std::unordered_multimap< int, int > HMMapII
 
using PoolHandle = std::shared_ptr< MemoryPool >
 
typedef DiagnosticContext< uintMarker
 Subject of this test: a thread-local stack of int values.
 
typedef HashIndexed< TestB, hash::LuidHMixin
 Base class to mix in the hash ID facility.
 
typedef IterStack< int > IStack
 
using List = LinkedElements< Nummy >
 default case: ownership for heap allocated nodes
 
using ListNotOwner = LinkedElements< Nummy, linked_elements::NoOwnership >
 managing existing node elements without taking ownership
 
typedef OpaqueHolder< Base > Opaque
 
using TestList = vector< Opaque >
 
using ParrT = lib::PathArray< 5 >
 
using PolyVal = PolymorphicValue< Interface, MAX_SIZ >
 
using Draw = RandomDraw< SymmetricFive >
 
typedef ScopedCollection< Dummy, sizeof(SubDummy)> CollD
 
typedef ScopedPtrVect< DummyVectD
 
typedef std::unordered_map< Symbol, string, hash< Symbol > > HTable
 
using MapS = std::map< string, string >
 
using TestVariant = Variant< Types< bool, int, string, Time > >
 

Classes

class  AllocationCluster_test
 
class  BranchCase_test
 
class  BuilderQualifierSupport_test
 
class  CallQueue_test
 
class  CmdlineWrapper_test
 
class  CustomSharedPtr_test
 
class  DelStash_test
 
class  DependencyConfiguration_test
 
class  DependencyFactory_test
 
class  DiagnosticContext_test
 
class  Dummy
 A Dummy object for tests. More...
 
struct  DummyAncestor
 
class  EventLog
 Helper to log and verify the occurrence of events. More...
 
class  EventMatch
 
class  ExpectString
 Helper to produce better diagnostic messages when comparing to an expected result string. More...
 
class  FunHashDispatch_test
 
class  GnuplotGen_test
 
class  HashGenerator_test
 
class  HashIndexed_test
 
class  HashStandardToBoostBridge_test
 
class  HeteroData_test
 
class  Impl
 
class  Impl_XXX
 
class  IncidenceCount_test
 
class  IndexIter_test
 
class  Interface
 Target object to be instantiated as Singleton Allocates a variable amount of additional heap memory and prints diagnostic messages. More...
 
class  IterAdapter_test
 
class  IterAdapterSTL_test
 
class  IterCoreAdapter_test
 
class  IterCursor_test
 
class  IterExplorer_test
 
class  IterQueue_test
 
class  IterSource_test
 
class  IterStack_test
 
class  IterTools_test
 
class  IterZip_test
 
class  LazyInit_test
 
class  LinkedElements_test
 
class  MemoryPool
 
struct  Mock_1
 Mock-1 to replace the Client Class... More...
 
struct  Mock_2
 Mock-2 to replace the Client Class... More...
 
class  MultiFact_test
 
class  MultiFactArgument_test
 
class  MultiFactSingleton_test
 
class  NullValue_test
 
class  OpaqueHolder_test
 
class  OpaqueUncheckedBuffer_test
 
class  OptionalRef_test
 
class  PathArray_test
 
class  PolymorphicValue_test
 
class  QueryText_test
 
class  Random_test
 
class  RandomConcurrent_test
 
class  RandomDraw_test
 
class  Result_test
 
class  S
 Custom-Datatype 1: uses std::hash extension point. More...
 
class  ScopedCollection_test
 
class  ScopedPtrVect_test
 
class  SearchPathSplitter_test
 
class  SeveralBuilder_test
 
class  Singleton_test
 
class  SingletonSubclass_test
 
class  SingletonTestMock_test
 
class  SplitSplice_test
 
class  Symbol_test
 
class  SymbolHashtable_test
 
class  SyncBarrier_test
 
class  SyncBarrierPerformance_test
 
class  SyncClasslock_test
 
class  SyncLocking_test
 
class  SyncTimedwait_test
 
class  SyncWaiting_test
 
class  TargetObj
 Target object to be instantiated as Singleton Allocates a variable amount of additional heap memory and prints diagnostic messages. More...
 
class  TempDir
 A RAII style temporary directory. More...
 
struct  TestB
 
struct  TestDA
 
struct  TestDB
 
class  TestSingO
 Client Class normally to be instantiated as Singleton. More...
 
class  TestTargetObj
 Target object to be created by Test-Factories or as Singleton. More...
 
class  TextTemplate_test
 
class  ThreadWrapper_test
 
class  ThreadWrapperAutonomous_test
 
class  ThreadWrapperJoin_test
 
class  ThreadWrapperLifecycle_test
 
class  ThreadWrapperSelfRecognitionTest_test
 
class  TimeBasics_test
 
class  TrackAlloc
 C++ standard compliant custom allocator adapter backed by the TrackingAllocator and the MemoryPool denoted at construction. More...
 
struct  Tracker
 A tracking Dummy object for tests. More...
 
class  TrackingAllocator
 Generic low-level allocator attached to tracking MemoryPool. More...
 
class  TrackingFactory
 Generic object factory backed by TrackingAllocator. More...
 
class  Transiently
 Token to capture a value and restore original when leaving scope. More...
 
class  Transiently< void(void)>
 Variation where manipulation is done by λ More...
 
class  TypedAllocationManager_test
 
class  TypedCounter_test
 
struct  TypeDebugger
 Helper to show types involved in metaprogramming. More...
 
class  TypedFamilyMemberID_test
 
class  UniqueMallocOwner_test
 
class  Unrelated
 
class  V
 Custom-Datatype 2: uses boost::hash extension point. More...
 
class  Variant_test
 
class  VerbFunctionDispatch_test
 
class  VerbVisitorDispatch_test
 
struct  X
 
struct  XX
 
class  ZombieCheck_test
 

Functions

template<class FUN >
double benchmarkTime (FUN const &invokeTestCode, const size_t repeatCnt=1)
 Helper to invoke a functor or λ to observe its running time.
 
template<class FUN >
size_t benchmarkLoop (FUN const &testSubject, const size_t repeatCnt=DEFAULT_RUNS)
 Benchmark building block to invoke a functor or λ in a tight loop, passing the current loop index and capturing a result checksum value.
 
template<class FUN >
auto microBenchmark (FUN const &testSubject, const size_t repeatCnt=DEFAULT_RUNS)
 perform a simple looped microbenchmark.
 
template<size_t nThreads, class FUN >
auto threadBenchmark (FUN const &subject, const size_t repeatCnt=DEFAULT_RUNS)
 perform a multithreaded microbenchmark.
 
template<class VEC >
VEC getTestSeq_int (const uint NUM_ELMS)
 
template<class MAP >
MAP getTestMap_int (const uint NUM_ELMS)
 
template<class MUMAP >
MUMAP getTestMultiMap_int (const uint NUM_ELMS)
 
template<class ITER >
void pullOut (ITER const &i)
 
string showSizeof (size_t siz, string name)
 for printing sizeof().
 
string randStr (size_t len)
 create garbage string of given length
 
template<typename F , typename N >
constexpr meta::enable_if< std::is_floating_point< F >, bool > roughEQ (F val, N target, F limit=ROUGH_PRECISION)
 
template<typename F >
constexpr meta::enable_if< std::is_floating_point< F >, F > ulp (F val)
 
template<typename F , typename N >
constexpr meta::enable_if< std::is_floating_point< F >, bool > epsEQ (F val, N target, uint ulps=EPSILON_ULP)
 
template<typename T >
string showSizeof (T const *obj=0, CStr name=0)
 for printing sizeof(), possibly figuring out the type name automatically
 
template<typename T >
meta::disable_if< std::is_pointer< T >, string > showSizeof (T const &obj, CStr name=nullptr)
 
template<typename T >
string showSizeof (CStr name)
 
template<typename R >
string showRefKind ()
 helper to discern the kind of reference of the argument type
 
template<typename X >
void typeDebugger (X &&x)
 
template<typename X >
string showType ()
 diagnostic type output, including const and similar adornments
 
template<typename... TS>
string showTypes ()
 
template<typename... EMPTY>
string showVariadicTypes ()
 helper for investigating a variadic argument pack
 
template<typename XX , typename... XS>
string showVariadicTypes (XX &&x, XS &&... xs)
 
lib::time::Time randTime ()
 create a random but not insane Time value between 1s ... 10min + 500ms
 
template<typename FUN , typename = lib::meta::enable_if<lib::meta::has_Sig<FUN, void(void)>>>
 Transiently (FUN &&) -> Transiently< void(void)>
 deduction guide: use λ for manipulation and clean-up
 
 LAUNCHER (CallQueue_test, "unit common")
 Register this test class...
 
 LAUNCHER (DependencyConfiguration_test, "unit common")
 
 LAUNCHER (DependencyFactory_test, "unit common")
 
 LAUNCHER (DiagnosticContext_test, "function common")
 Register this test class...
 
 LAUNCHER (SingletonSubclass_test, "unit common")
 Register this test class...
 
 LAUNCHER (Singleton_test, "unit common")
 Register this test class...
 
 LAUNCHER (SingletonTestMock_test, "unit common")
 Register this test class...
 
 LAUNCHER (TimeBasics_test, "unit common")
 Register this test class...
 
 LAUNCHER (TypedCounter_test, "unit common")
 Register this test class...
 
 LAUNCHER (TypedFamilyMemberID_test, "unit common")
 Register this test class...
 
 LAUNCHER (ZombieCheck_test, "unit common")
 Register this test class...
 
 LAUNCHER (AllocationCluster_test, "unit common")
 
 LAUNCHER (BranchCase_test, "unit common")
 
 LAUNCHER (BuilderQualifierSupport_test, "unit common")
 Register this test class...
 
 LAUNCHER (CmdlineWrapper_test, "unit common")
 
 LAUNCHER (CustomSharedPtr_test, "unit common")
 Register this test class...
 
 LAUNCHER (DelStash_test, "unit common")
 Register this test class...
 
 LAUNCHER (FunHashDispatch_test, "unit common")
 Register this test class...
 
 LAUNCHER (GnuplotGen_test, "unit common")
 
 LAUNCHER (HashGenerator_test, "unit common")
 Register this test class...
 
 LAUNCHER (HashIndexed_test, "unit common")
 Register this test class...
 
 LAUNCHER (HashStandardToBoostBridge_test, "unit common")
 Register this test class...
 
 LAUNCHER (HeteroData_test, "unit common")
 Register this test class...
 
 LAUNCHER (IncidenceCount_test, "unit common")
 
 LAUNCHER (IndexIter_test, "unit common")
 
 LAUNCHER (IterAdapterSTL_test, "unit common")
 
 LAUNCHER (IterAdapter_test, "unit common")
 
 LAUNCHER (IterCoreAdapter_test, "unit common")
 
 LAUNCHER (IterCursor_test, "unit common")
 
 LAUNCHER (IterExplorer_test, "unit common")
 
 LAUNCHER (IterQueue_test, "unit common")
 
 LAUNCHER (IterSource_test, "unit common")
 
 LAUNCHER (IterStack_test, "unit common")
 
 LAUNCHER (IterZip_test, "unit common")
 
 LAUNCHER (IterTools_test, "unit common")
 
 LAUNCHER (LazyInit_test, "unit common")
 Register this test class...
 
 LAUNCHER (LinkedElements_test, "unit common")
 
 LAUNCHER (MultiFactArgument_test, "unit common")
 Register this test class...
 
 LAUNCHER (MultiFactSingleton_test, "unit common")
 Register this test class...
 
 LAUNCHER (MultiFact_test, "unit common")
 Register this test class...
 
 LAUNCHER (NullValue_test, "unit common")
 Register this test class...
 
 LAUNCHER (OpaqueHolder_test, "unit common")
 
 LAUNCHER (OpaqueUncheckedBuffer_test, "unit common")
 
 LAUNCHER (OptionalRef_test, "unit common")
 
 LAUNCHER (PathArray_test, "unit stage")
 Register this test class...
 
 LAUNCHER (PolymorphicValue_test, "unit common")
 
 LAUNCHER (QueryText_test, "unit common")
 Register this test class...
 
 LAUNCHER (RandomConcurrent_test, "unit common")
 
 LAUNCHER (RandomDraw_test, "unit common")
 Register this test class...
 
 LAUNCHER (Random_test, "unit common")
 
 LAUNCHER (Result_test, "unit common")
 Register this test class...
 
 LAUNCHER (ScopedCollection_test, "unit common")
 
 LAUNCHER (ScopedPtrVect_test, "unit common")
 
 LAUNCHER (SearchPathSplitter_test, "unit common")
 
 LAUNCHER (SeveralBuilder_test, "unit common")
 Register this test class...
 
 LAUNCHER (SplitSplice_test, "unit common")
 
 LAUNCHER (SymbolHashtable_test, "function common")
 
 LAUNCHER (Symbol_test, "unit common")
 
 LAUNCHER (SyncBarrierPerformance_test, "function common")
 Register this test class...
 
 LAUNCHER (SyncBarrier_test, "function common")
 Register this test class...
 
 LAUNCHER (SyncClasslock_test, "unit common")
 Register this test class...
 
 LAUNCHER (SyncLocking_test, "function common")
 Register this test class...
 
 LAUNCHER (SyncTimedwait_test, "unit common")
 Register this test class...
 
 LAUNCHER (SyncWaiting_test, "unit common")
 Register this test class...
 
 LAUNCHER (TextTemplate_test, "unit common")
 
 LAUNCHER (ThreadWrapperAutonomous_test, "function common")
 Register this test class...
 
 LAUNCHER (ThreadWrapperJoin_test, "function common")
 Register this test class...
 
 LAUNCHER (ThreadWrapperLifecycle_test, "function common")
 Register this test class...
 
 LAUNCHER (ThreadWrapperSelfRecognitionTest_test, "function common")
 Register this test class...
 
 LAUNCHER (ThreadWrapper_test, "function common")
 Register this test class...
 
 LAUNCHER (TypedAllocationManager_test, "unit common")
 Register this test class...
 
 LAUNCHER (UniqueMallocOwner_test, "unit common")
 Register this test class...
 
 LAUNCHER (Variant_test, "unit common")
 Register this test class...
 
 LAUNCHER (VerbFunctionDispatch_test, "unit common")
 Register this test class...
 
 LAUNCHER (VerbVisitorDispatch_test, "unit common")
 Register this test class...
 

Variables

constexpr auto ROUGH_PRECISION = pow (10, -3)
 
constexpr auto EPSILON_ULP = 5
 

Typedef Documentation

◆ VecI

typedef std::vector< uint > VecI

Definition at line 34 of file test-coll.hpp.

◆ MapII

typedef std::map<int,int> MapII

Definition at line 48 of file test-coll.hpp.

◆ MMapII

typedef std::multimap<int,int> MMapII

Definition at line 49 of file test-coll.hpp.

◆ HMapII

typedef std::unordered_map<int,int> HMapII

Definition at line 51 of file test-coll.hpp.

◆ HMMapII

typedef std::unordered_multimap<int,int> HMMapII

Definition at line 52 of file test-coll.hpp.

◆ PoolHandle

using PoolHandle = std::shared_ptr<MemoryPool>

Definition at line 73 of file tracking-allocator.hpp.

◆ Marker

Subject of this test: a thread-local stack of int values.

Definition at line 60 of file diagnostic-context-test.cpp.

◆ Mixin

Base class to mix in the hash ID facility.

actual configuration of the mixin

Definition at line 40 of file hash-indexed-test.cpp.

◆ IStack

typedef IterStack<int> IStack

Definition at line 38 of file iter-stack-test.cpp.

◆ List

using List = LinkedElements<Nummy>

default case: ownership for heap allocated nodes

Definition at line 158 of file linked-elements-test.cpp.

◆ ListNotOwner

managing existing node elements without taking ownership

Definition at line 161 of file linked-elements-test.cpp.

◆ Opaque

typedef OpaqueHolder<Base> Opaque

Definition at line 96 of file opaque-holder-test.cpp.

◆ TestList

typedef std::vector< PolyVal > TestList

Definition at line 97 of file opaque-holder-test.cpp.

◆ ParrT

using ParrT = lib::PathArray<5>

Definition at line 41 of file path-array-test.cpp.

◆ PolyVal

using PolyVal = PolymorphicValue<Interface, MAX_SIZ>

Definition at line 151 of file polymorphic-value-test.cpp.

◆ Draw

using Draw = RandomDraw<SymmetricFive>

Definition at line 98 of file random-draw-test.cpp.

◆ CollD

typedef ScopedCollection<Dummy, sizeof(SubDummy)> CollD

Definition at line 85 of file scoped-collection-test.cpp.

◆ VectD

Definition at line 36 of file scoped-ptrvect-test.cpp.

◆ HTable

typedef std::unordered_map< Symbol, string, hash<Symbol> > HTable

Definition at line 52 of file symbol-hashtable-test.cpp.

◆ MapS

using MapS = std::map<string, string>

Definition at line 40 of file text-template-test.cpp.

◆ TestVariant

using TestVariant = Variant<Types<bool,int,string,Time> >

Definition at line 46 of file variant-test.cpp.


Class Documentation

◆ lib::test::TypeDebugger

struct lib::test::TypeDebugger
+ Collaboration diagram for TypeDebugger< X >:

◆ lib::test::Unrelated

class lib::test::Unrelated
+ Collaboration diagram for Unrelated:

Function Documentation

◆ benchmarkTime()

template<class FUN >
double benchmarkTime ( FUN const &  invokeTestCode,
const size_t  repeatCnt = 1 
)
inline

Helper to invoke a functor or λ to observe its running time.

Parameters
invokeTestLoopthe test (complete including loop) invoked once
repeatCntnumber of repetitions to divide the timing measurement
Returns
averaged time for one repetition, in microseconds

Definition at line 76 of file microbenchmark.hpp.

References benchmarkTime().

Referenced by benchmarkTime(), SchedulerService_test::invokeWorkFunction(), microBenchmark(), BlockFlow_test::storageFlow(), IncidenceCount_test::verify_concurrencyStatistic(), and ThreadWrapper_test::verifyConcurrentExecution().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ benchmarkLoop()

template<class FUN >
size_t benchmarkLoop ( FUN const &  testSubject,
const size_t  repeatCnt = DEFAULT_RUNS 
)
inline

Benchmark building block to invoke a functor or λ in a tight loop, passing the current loop index and capturing a result checksum value.

Returns
sum of all individual invocation results as checksum

Definition at line 95 of file microbenchmark.hpp.

References lib::test::microbenchmark::adapted4benchmark().

Referenced by microBenchmark().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ microBenchmark()

template<class FUN >
auto microBenchmark ( FUN const &  testSubject,
const size_t  repeatCnt = DEFAULT_RUNS 
)
inline

perform a simple looped microbenchmark.

Parameters
testSubjectthe operation to test as functor or λ
Returns
a pair (microseconds, checksum)
Warning
this setup is only usable under strong optimisation; moreover, the scaffolding without actual operation should also be tested for comparison, to get a feeling for the setup overhead. For very small test subjects (single operations) it is recommended to use a direct loop without any lambdas and building blocks.

Definition at line 118 of file microbenchmark.hpp.

References benchmarkLoop(), benchmarkTime(), and microBenchmark().

Referenced by RandomConcurrent_test::benchmark_random_gen(), and microBenchmark().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ threadBenchmark()

template<size_t nThreads, class FUN >
auto threadBenchmark ( FUN const &  subject,
const size_t  repeatCnt = DEFAULT_RUNS 
)
inline

perform a multithreaded microbenchmark.

This function fires up a number of threads and invokes the given test subject repeatedly.

Template Parameters
numberof threads to run in parallel
Parameters
subjectfunction to be timed in parallel
repeatCntloop-count within each thread
Returns
a pair (microseconds, checksum) combining the averaged invocation time and a compounded checksum from all threads.
Remarks
- the subject function will be copied into each thread
  • so nThreads copies of this function will run in parallel
  • consider locking if this function accesses a shared closure.
  • if you pass a lambda, it is eligible for inlining followed by loop optimisation – be sure to include an observable effect, like returning a value tied to the actual computation, to prevent the compiler from optimising it away altogether.

Definition at line 147 of file microbenchmark.hpp.

References lib::test::microbenchmark::adapted4benchmark(), ScopedCollection< I, siz >::emplace(), SyncBarrier::sync(), and threadBenchmark().

Referenced by threadBenchmark().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTestSeq_int()

template<class VEC >
VEC getTestSeq_int ( const uint  NUM_ELMS)
inline

Definition at line 38 of file test-coll.hpp.

◆ getTestMap_int()

template<class MAP >
MAP getTestMap_int ( const uint  NUM_ELMS)
inline

Definition at line 57 of file test-coll.hpp.

◆ getTestMultiMap_int()

template<class MUMAP >
MUMAP getTestMultiMap_int ( const uint  NUM_ELMS)
inline

Definition at line 68 of file test-coll.hpp.

◆ pullOut()

template<class ITER >
void pullOut ( ITER const &  i)
inline

Definition at line 82 of file test-coll.hpp.

Referenced by IterSource_test::verify_MapWrappers(), IterSource_test::verify_MultimapIters(), IterSource_test::verify_simpleIters(), IterSource_test::verify_transformIter(), and IterExplorer_test::verify_wrappedState().

+ Here is the caller graph for this function:

◆ showSizeof() [1/4]

string showSizeof ( size_t  siz,
string  name 
)

for printing sizeof().

prints the given size and name literally, without any further magic

Definition at line 49 of file test-helper.cpp.

References showSizeof().

Referenced by Symbol_test::checkLiteral(), TestHelper_test::checkTypeDisplay(), MultiFactArgument_test::run(), MultiFactSingleton_test::run(), showSizeof(), showSizeof(), showSizeof(), and showSizeof().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ randStr()

string randStr ( size_t  len)

create garbage string of given length

Todo:
probably this can be done in a more clever way. Anyone...?
Returns
string containing arbitrary lower case letters and numbers

Definition at line 61 of file test-helper.cpp.

References randStr(), and lib::rani().

Referenced by TestSource::TestSource(), Variant_test::accessVariant(), TestHelper_test::checkGarbageStr(), SymbolHashtable_test::checkHashFunction(), HashStandardToBoostBridge_test::checkHashtableUsage(), randStr(), UniqueMallocOwner_test::run(), ZombieCheck_test::run(), OptionalRef_test::run(), TempDir_test::simpleUsage(), IterSource_test::verify_MapWrappers(), and AllocationCluster_test::verifyInternals().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ roughEQ()

template<typename F , typename N >
constexpr meta::enable_if< std::is_floating_point< F >, bool > roughEQ ( val,
target,
limit = ROUGH_PRECISION 
)
inlineconstexpr

Definition at line 67 of file test-helper.hpp.

References roughEQ().

Referenced by roughEQ().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ulp()

template<typename F >
constexpr meta::enable_if< std::is_floating_point< F >, F > ulp ( val)
inlineconstexpr

◆ epsEQ()

template<typename F , typename N >
constexpr meta::enable_if< std::is_floating_point< F >, bool > epsEQ ( val,
target,
uint  ulps = EPSILON_ULP 
)
inlineconstexpr

◆ showSizeof() [2/4]

template<typename T >
string showSizeof ( T const *  obj = 0,
CStr  name = 0 
)
inline

for printing sizeof(), possibly figuring out the type name automatically

Parameters
namewhen given, this name will be used for display, instead of auto detecting the type

Definition at line 108 of file test-helper.hpp.

References showSizeof().

+ Here is the call graph for this function:

◆ showSizeof() [3/4]

template<typename T >
meta::disable_if< std::is_pointer< T >, string > showSizeof ( T const &  obj,
CStr  name = nullptr 
)
inline

Definition at line 117 of file test-helper.hpp.

References showSizeof().

+ Here is the call graph for this function:

◆ showSizeof() [4/4]

template<typename T >
string showSizeof ( CStr  name)
inline

Definition at line 124 of file test-helper.hpp.

References showSizeof().

+ Here is the call graph for this function:

◆ showRefKind()

template<typename R >
string showRefKind ( )

helper to discern the kind of reference of the argument type

Examples
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 134 of file test-helper.hpp.

◆ typeDebugger()

template<typename X >
void typeDebugger ( X &&  x)

◆ showType()

template<typename X >
string showType ( )
inline

diagnostic type output, including const and similar adornments

Warning
operates after-the-fact and relies on mangled type names plus several heuristics. Output might thus not be entirely correct, especially when several levels of const, pointer and references are involved. If in doubt, place the TypeDebugger<T> to reveal the type as the compiler sees it.
Remarks
the function lib::meta::typeStr removes adornments and does not work on all kinds of reference. This helper attempts to work around those limitations.
Examples
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 257 of file test-helper.hpp.

References lib::meta::humanReadableTypeID(), and Type.

Referenced by IterCoreAdapter_test::value_and_reference_yield(), HeteroData_test::verify_ChainBlock(), IterExplorer_test::verify_elementGroupingOperation(), and HeteroData_test::verify_FrontBlock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTypes()

template<typename... TS>
string showTypes ( )

◆ showVariadicTypes() [1/2]

template<typename... EMPTY>
string showVariadicTypes ( )
inline

helper for investigating a variadic argument pack

Remarks
you can pass arguments directly to this function, but be sure to use std::forward<ARGS>(args)... when forwarding universal references received from a variadic argument pack ARG.
Note
due to reference collapsing it is not possible to distinguish receiving a value from receiving a rvalue-reference.
See also
test-helper-variadic-test.cpp
Examples
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 285 of file test-helper.hpp.

Referenced by TestHelperVariadic_test::forwardFunction(), TestHelperVariadic_test::run(), and showVariadicTypes().

+ Here is the caller graph for this function:

◆ showVariadicTypes() [2/2]

template<typename XX , typename... XS>
string showVariadicTypes ( XX &&  x,
XS &&...  xs 
)
inline

Definition at line 292 of file test-helper.hpp.

References util::showAdr(), showVariadicTypes(), and util::toString().

+ Here is the call graph for this function:

◆ randTime()

lib::time::Time randTime ( )
inline

create a random but not insane Time value between 1s ... 10min + 500ms

Definition at line 309 of file test-helper.hpp.

References randTime(), and lib::rani().

Referenced by Variant_test::accessVariant(), TimeBasics_test::checkComponentBreakdown(), randTime(), and IterSource_test::verify_MapWrappers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Transiently()

template<typename FUN , typename = lib::meta::enable_if<lib::meta::has_Sig<FUN, void(void)>>>
Transiently ( FUN &&  ) -> Transiently< void(void)>

deduction guide: use λ for manipulation and clean-up

Remarks
activated when given a function with signature <void(void)>

◆ LAUNCHER() [1/75]

LAUNCHER ( CallQueue_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [2/75]

LAUNCHER ( DependencyConfiguration_test  ,
"unit common"   
)

◆ LAUNCHER() [3/75]

LAUNCHER ( DependencyFactory_test  ,
"unit common"   
)

◆ LAUNCHER() [4/75]

LAUNCHER ( DiagnosticContext_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [5/75]

LAUNCHER ( SingletonSubclass_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [6/75]

LAUNCHER ( Singleton_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [7/75]

LAUNCHER ( SingletonTestMock_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [8/75]

LAUNCHER ( TimeBasics_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [9/75]

LAUNCHER ( TypedCounter_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [10/75]

LAUNCHER ( TypedFamilyMemberID_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [11/75]

LAUNCHER ( ZombieCheck_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [12/75]

LAUNCHER ( AllocationCluster_test  ,
"unit common"   
)

◆ LAUNCHER() [13/75]

LAUNCHER ( BranchCase_test  ,
"unit common"   
)

◆ LAUNCHER() [14/75]

LAUNCHER ( BuilderQualifierSupport_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [15/75]

LAUNCHER ( CmdlineWrapper_test  ,
"unit common"   
)

◆ LAUNCHER() [16/75]

LAUNCHER ( CustomSharedPtr_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [17/75]

LAUNCHER ( DelStash_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [18/75]

LAUNCHER ( FunHashDispatch_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [19/75]

LAUNCHER ( GnuplotGen_test  ,
"unit common"   
)

◆ LAUNCHER() [20/75]

LAUNCHER ( HashGenerator_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [21/75]

LAUNCHER ( HashIndexed_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [22/75]

LAUNCHER ( HashStandardToBoostBridge_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [23/75]

LAUNCHER ( HeteroData_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [24/75]

LAUNCHER ( IncidenceCount_test  ,
"unit common"   
)

◆ LAUNCHER() [25/75]

LAUNCHER ( IndexIter_test  ,
"unit common"   
)

◆ LAUNCHER() [26/75]

LAUNCHER ( IterAdapterSTL_test  ,
"unit common"   
)

◆ LAUNCHER() [27/75]

LAUNCHER ( IterAdapter_test  ,
"unit common"   
)

◆ LAUNCHER() [28/75]

LAUNCHER ( IterCoreAdapter_test  ,
"unit common"   
)

◆ LAUNCHER() [29/75]

LAUNCHER ( IterCursor_test  ,
"unit common"   
)

◆ LAUNCHER() [30/75]

LAUNCHER ( IterExplorer_test  ,
"unit common"   
)

◆ LAUNCHER() [31/75]

LAUNCHER ( IterQueue_test  ,
"unit common"   
)

◆ LAUNCHER() [32/75]

LAUNCHER ( IterSource_test  ,
"unit common"   
)

◆ LAUNCHER() [33/75]

LAUNCHER ( IterStack_test  ,
"unit common"   
)

◆ LAUNCHER() [34/75]

LAUNCHER ( IterZip_test  ,
"unit common"   
)

◆ LAUNCHER() [35/75]

LAUNCHER ( IterTools_test  ,
"unit common"   
)

◆ LAUNCHER() [36/75]

LAUNCHER ( LazyInit_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [37/75]

LAUNCHER ( LinkedElements_test  ,
"unit common"   
)

◆ LAUNCHER() [38/75]

LAUNCHER ( MultiFactArgument_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [39/75]

LAUNCHER ( MultiFactSingleton_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [40/75]

LAUNCHER ( MultiFact_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [41/75]

LAUNCHER ( NullValue_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [42/75]

LAUNCHER ( OpaqueHolder_test  ,
"unit common"   
)

◆ LAUNCHER() [43/75]

LAUNCHER ( OpaqueUncheckedBuffer_test  ,
"unit common"   
)

◆ LAUNCHER() [44/75]

LAUNCHER ( OptionalRef_test  ,
"unit common"   
)

◆ LAUNCHER() [45/75]

LAUNCHER ( PathArray_test  ,
"unit stage"   
)

Register this test class...

◆ LAUNCHER() [46/75]

LAUNCHER ( PolymorphicValue_test  ,
"unit common"   
)

◆ LAUNCHER() [47/75]

LAUNCHER ( QueryText_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [48/75]

LAUNCHER ( RandomConcurrent_test  ,
"unit common"   
)

◆ LAUNCHER() [49/75]

LAUNCHER ( RandomDraw_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [50/75]

LAUNCHER ( Random_test  ,
"unit common"   
)

◆ LAUNCHER() [51/75]

LAUNCHER ( Result_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [52/75]

LAUNCHER ( ScopedCollection_test  ,
"unit common"   
)

◆ LAUNCHER() [53/75]

LAUNCHER ( ScopedPtrVect_test  ,
"unit common"   
)

◆ LAUNCHER() [54/75]

LAUNCHER ( SearchPathSplitter_test  ,
"unit common"   
)

◆ LAUNCHER() [55/75]

LAUNCHER ( SeveralBuilder_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [56/75]

LAUNCHER ( SplitSplice_test  ,
"unit common"   
)

◆ LAUNCHER() [57/75]

LAUNCHER ( SymbolHashtable_test  ,
"function common"   
)

◆ LAUNCHER() [58/75]

LAUNCHER ( Symbol_test  ,
"unit common"   
)

◆ LAUNCHER() [59/75]

LAUNCHER ( SyncBarrierPerformance_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [60/75]

LAUNCHER ( SyncBarrier_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [61/75]

LAUNCHER ( SyncClasslock_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [62/75]

LAUNCHER ( SyncLocking_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [63/75]

LAUNCHER ( SyncTimedwait_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [64/75]

LAUNCHER ( SyncWaiting_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [65/75]

LAUNCHER ( TextTemplate_test  ,
"unit common"   
)

◆ LAUNCHER() [66/75]

LAUNCHER ( ThreadWrapperAutonomous_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [67/75]

LAUNCHER ( ThreadWrapperJoin_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [68/75]

LAUNCHER ( ThreadWrapperLifecycle_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [69/75]

LAUNCHER ( ThreadWrapperSelfRecognitionTest_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [70/75]

LAUNCHER ( ThreadWrapper_test  ,
"function common"   
)

Register this test class...

◆ LAUNCHER() [71/75]

LAUNCHER ( TypedAllocationManager_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [72/75]

LAUNCHER ( UniqueMallocOwner_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [73/75]

LAUNCHER ( Variant_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [74/75]

LAUNCHER ( VerbFunctionDispatch_test  ,
"unit common"   
)

Register this test class...

◆ LAUNCHER() [75/75]

LAUNCHER ( VerbVisitorDispatch_test  ,
"unit common"   
)

Register this test class...

Variable Documentation

◆ ROUGH_PRECISION

constexpr auto ROUGH_PRECISION = pow (10, -3)
constexpr

◆ EPSILON_ULP

constexpr auto EPSILON_ULP = 5
constexpr