Lumiera  0.pre.03
»edit your freedom«
linked-elements-test.cpp File Reference

Go to the source code of this file.

Description

unit test LinkedElements_test

Definition in file linked-elements-test.cpp.

#include "lib/test/run.hpp"
#include "lib/test/test-helper.hpp"
#include "lib/util.hpp"
#include "lib/allocation-cluster.hpp"
#include "lib/linked-elements.hpp"
#include "lib/test/tracking-dummy.hpp"
#include "lib/iter-source.hpp"
#include <memory>

Classes

class  LinkedElements_test
 
struct  Num< I >
 to demonstrate holding subclasses More...
 
struct  Nummy
 Test-Element, supporting intrusive linked list storage. More...
 
class  NummyGenerator
 Helper to produce a pre-determined series of objects to populate a LinkedElements list. More...
 
class  Populator
 Iterator-Frontend to generate this series of objects. More...
 
struct  LinkedElements_test::UseAllocationCluster
 Policy to use an Allocation cluster, but also to invoke all object destructors. More...
 

Typedefs

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
 

Functions

void __triggerError_reset ()
 
void __triggerErrorAt (int i)
 
 LAUNCHER (LinkedElements_test, "unit common")
 
 LUMIERA_ERROR_DEFINE (PROVOKED_FAILURE, "provoked failure")
 
uint sum (uint n)
 

Variables

int exception_trigger = -1
 
const uint NUM_ELEMENTS = 500
 

Namespaces

 lib
 Implementation namespace for support and library code.