![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
Implementation of fake data frames to support unit testing. More...
Go to the source code of this file.
Implementation of fake data frames to support unit testing.
The data generation is based on a discriminator seed value, which is computed as a linear combination of a statically fixed anchor-seed combined with the family-number and sequence number. Based on this seed, the contents are then filled by a pseudo-random sequence.
Additionally, beyond this basic test-data feature, the contents can be manipulated freely, and a new checksum can be stored in the metadata, which allows to build pseudo media computation functions with a reproducible effect — so that the proper invocation of several computation steps invoked deep down in the render engine can be verified after completing a test invocation.
Definition in file testframe.cpp.
#include "lib/error.hpp"#include "lib/random.hpp"#include "lib/hash-standard.hpp"#include "lib/hash-combine.hpp"#include "steam/engine/testframe.hpp"#include "lib/nocopy.hpp"#include "lib/util.hpp"#include <climits>#include <memory>#include <deque>Namespaces | |
| namespace | steam |
| Steam-Layer implementation namespace root. | |
| namespace | steam::engine |
| Lumiera's render engine core and operational control. | |
| namespace | steam::engine::test |
| namespace | steam::engine::test::anonymous_namespace{testframe.cpp} |
Typedefs | |
| using | PseudoRandom = lib::RandomSequencer< std::minstd_rand > |
Classes | |
| class | DistinctNucleus |
| struct | TestFrameTable |
Functions | |
| HashVal | drawSeed (lib::Random &srcGen) |
| uint64_t | generateDiscriminator (uint seq, uint family) |
| HashVal | stampHeader () |
| auto | buildDataGenFrom (uint64_t const &anchor) |
| TestFrame & | accessAsTestFrame (void *memoryLocation) |
| TestFrame & | testData (uint seqNr=0, uint chanNr=0) |
| Helper to access a specific frame of test data at a fixed memory location. | |
Variables | |
| const size_t | SEQUENCE_SPREAD = 100 |
| Offset to set the seed values of »families« apart. | |
| HashVal | dataSeed {drawSeed(lib::entropyGen)} |
| std::unique_ptr< TestFrameTable > | testFrames |