Lumiera
0.pre.03
»edit your freedom«
|
#include "/Werk/devel/lumi/tests/core/steam/engine/testframe.hpp"
Mock data frame for simulated rendering.
A test frame can be created and placed instead of a real data frame. It doesn't depend on any external libraries and will be self-maintaining. Placeholder functions are provided for assignment (simulating the actual calculations); additional diagnostic functions allow to verify the performed operations after-the fact
Each TestFrame is automatically filled with pseudo random data; multiple frames are arranged in sequences and channels, causing the random data to be reproducible yet different within each frame. TestFrame's lifecycle is tracked and marked in an embedded state field. Moreover, the contents of the data block can be verified, because the sequence of bytes is reproducible, based on the channel and sequence number of the test frame.
Definition at line 60 of file testframe.hpp.
Public Member Functions | |
TestFrame (uint seq=0, uint family=0) | |
TestFrame (TestFrame const &) | |
bool | isAlive () const |
bool | isDead () const |
bool | isSane () const |
TestFrame & | operator= (TestFrame const &) |
bool | operator== (void *memLocation) const |
Static Public Member Functions | |
static bool | isAlive (void *memLocation) |
Helper to verify that a given memory location holds an active TestFrame instance (created, not yet destroyed) More... | |
static bool | isDead (void *memLocation) |
Helper to verify a given memory location holds an already destroyed TestFrame instance. | |
Friends | |
bool | operator!= (TestFrame const &f1, TestFrame const &f2) |
bool | operator== (TestFrame const &f1, TestFrame const &f2) |
Private Types | |
enum | StageOfLife { CREATED, EMITTED, DISCARDED } |
Private Member Functions | |
void | buildData () |
bool | contentEquals (TestFrame const &o) const |
bool | verifyData () const |
Private Attributes | |
char | data_ [BUFFSIZ] |
uint64_t | distinction_ |
StageOfLife | stage_ |
Static Private Attributes | |
static const size_t | BUFFSIZ = 1024 |
|
static |
Helper to verify that a given memory location holds an active TestFrame instance (created, not yet destroyed)
Definition at line 221 of file testframe.cpp.