Lumiera  0.pre.03
»edit your freedom«
testframe.cpp File Reference

Go to the source code of this file.

Description

Implementation of fake data frames to support unit testing.

Definition in file testframe.cpp.

#include "steam/engine/testframe.hpp"
#include "lib/error.hpp"
#include <boost/random/linear_congruential.hpp>
#include <cstring>
#include <memory>
#include <vector>

Classes

struct  TestFrameTable< CHA, FRA >
 

Typedefs

typedef boost::rand48 PseudoRandom
 
typedef TestFrameTable< INITIAL_CHAN, INITIAL_FRAMES > TestFrames
 

Functions

TestFrame & accessAsTestFrame (void *memoryLocation)
 
TestFrame & accessTestFrame (uint seqNr, uint chanNr)
 
uint64_t generateDistinction (uint seq, uint family)
 
void resetTestFrames ()
 discards all the TestFrame instances and initialises an empty table of test frames
 
TestFrame & testData (uint seqNr)
 Helper to access a specific frame of test data at a fixed memory location. More...
 
TestFrame & testData (uint chanNr, uint seqNr)
 

Variables

const uint INITIAL_CHAN = 20
 
const uint INITIAL_FRAMES = 100
 
std::unique_ptr< TestFrames > testFrames
 

Namespaces

 steam
 Steam-Layer implementation namespace root.
 
 steam::engine
 Lumiera's render engine core and operational control.
 

Function Documentation

◆ testData()

TestFrame & testData ( uint  seqNr)

Helper to access a specific frame of test data at a fixed memory location.

The series of test frames is generated on demand, but remains in memory thereafter, similar to real data accessible from some kind of source stream. Each of these generated test frames filled with different yet reproducible pseudo random data. Client code is free to access and corrupt this data.

Definition at line 155 of file testframe.cpp.

Referenced by TestFrame_test::useFrameTable().

+ Here is the caller graph for this function: