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

#include "lib/test/tracking-dummy.hpp"

Description

A Dummy object for tests.

Each instance includes some distinct random identity marker plus a checksum facility to verify instance management, i.e. to verify each created instance was properly destroyed after use.

Definition at line 46 of file tracking-dummy.hpp.

Public Member Functions

 Dummy (int v)
 
 Dummy (Dummy &&oDummy) noexcept
 
virtual long calc (int i)
 a dummy API operation
 
int getVal () const
 
Dummyoperator= (Dummy &&oDummy)
 
void setVal (int newVal)
 

Static Public Member Functions

static void activateCtorFailure (bool indeed=true)
 
static long & checksum ()
 

Friends

void swap (Dummy &dum1, Dummy &dum2)
 

Private Member Functions

void init ()
 
- Private Member Functions inherited from MoveAssign
 MoveAssign (MoveAssign &&)=default
 
 MoveAssign (MoveAssign const &)=delete
 
MoveAssignoperator= (MoveAssign &&)=default
 
MoveAssignoperator= (MoveAssign const &)=delete
 

Private Attributes

int val_
 

Static Private Attributes

static long _local_checksum = 0
 to verify ctor/dtor calls More...
 
static bool _throw_in_ctor = false
 

Member Data Documentation

◆ _local_checksum

long _local_checksum = 0
staticprivate

to verify ctor/dtor calls

storage for test-dummy flags

Definition at line 52 of file tracking-dummy.hpp.

Friends And Related Function Documentation

◆ swap

void swap ( Dummy dum1,
Dummy dum2 
)
friend
Parameters
dum2checksum neutral

Definition at line 108 of file tracking-dummy.hpp.

+ Inheritance diagram for Dummy:
+ Collaboration diagram for Dummy:

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