Lumiera  0.pre.03
»edit your freedom«
LinkedElements_test Class Reference

Description

Test:
cover our custom single linked list template, in combination with Lumiera Forward Iterators and the usage of a custom allocator.

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

Private Member Functions

void iterating ()
 
void populate_by_iterator ()
 
void reverseList ()
 
virtual void run (Arg)
 
void simpleUsage ()
 
void verify_customAllocator ()
 
void verify_ExceptionSafety ()
 
void verify_nonOwnership ()
 
void verify_RAII_safety ()
 

Member Function Documentation

◆ verify_nonOwnership()

void verify_nonOwnership ( )
inlineprivate
Test:
add some node elements to the LinkedElements list but without taking ownership or performing any memory management.

This usage pattern is helpful when the node elements are already managed elsewhere.

Note
we're still (intrusively) using the next pointer within the node elements. This means, that still a given node can't be member in multiple lists.

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

References lib::elements().

+ Here is the call graph for this function:

◆ verify_RAII_safety()

void verify_RAII_safety ( )
inlineprivate
Test:
to support using LinkedElements within RAII-style components, all the elements might be added in one sway, by pulling them from a Lumiera Forward Iterator.

In case this is done in the ctor, any exception while doing so will trigger cleanup of all elements (and then failure of the ctor alltogether)

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

+ Inheritance diagram for LinkedElements_test:
+ Collaboration diagram for LinkedElements_test:

The documentation for this class was generated from the following file: