Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
NodeDevel_test Class Reference

Description

Test:
verify support for developing Render Node functionality.
  • raw processing functions to generate and manipulate TestFrame data, including hash chaining.
  • a »TestRand-Ontology«, which is a test helper framework, and mimics a real Domain Ontology (as would be accessible through the adapter plug-in of a specific media handling library.
  • some convenience shortcuts to build test-nodes

Definition at line 75 of file node-devel-test.cpp.

Private Member Functions

virtual void run (Arg)
 
void processing_generateFrame ()
 
void processing_generateMultichan ()
 
void processing_duplicateMultichan ()
 
void processing_manipulateMultichan ()
 
void processing_manipulateFrame ()
 
void processing_combineFrames ()
 
void testRand_simpleUsage ()
 
void testRand_buildFilterNode ()
 
void testRand_buildMixNode ()
 

Static Private Member Functions

static ProcNode makeSrcNode (ont::FraNo frameNr, ont::Flavr flavour)
 shortcut to simplify the following test cases
 

Member Function Documentation

◆ run()

◆ processing_generateFrame()

void processing_generateFrame ( )
inlineprivate
Test:
function to generate random test data frames

Definition at line 99 of file node-devel-test.cpp.

References steam::engine::test::ont::generateFrame(), and RandomSequencer< GEN >::u64().

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processing_generateMultichan()

void processing_generateMultichan ( )
inlineprivate
Test:
function to generate an array of random test data frames for consecutive channels

Definition at line 117 of file node-devel-test.cpp.

References steam::engine::test::ont::generateMultichan(), and RandomSequencer< GEN >::u64().

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processing_duplicateMultichan()

void processing_duplicateMultichan ( )
inlineprivate
Test:
clone copy of multichannel test data

Definition at line 140 of file node-devel-test.cpp.

References steam::engine::test::ont::duplicateMultichan(), steam::engine::test::ont::generateMultichan(), and RandomSequencer< GEN >::u64().

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processing_manipulateMultichan()

void processing_manipulateMultichan ( )
inlineprivate
Test:
multichannel data hash-chain manipulation
  • use multichannel pseudo random input data
  • store away a clone copy before manipulation
  • the #manipulateMultichan() operates in-place in the buffers
  • each buffer has been marked with a new checksum afterwards
  • and each buffer now differs from original state
  • verify that corresponding data points over all channels have been linked by a hashcode-chain, seeded with the param and then consecutively hashing in data from each channel.

Definition at line 172 of file node-devel-test.cpp.

References lib::hash::combine(), steam::engine::test::ont::duplicateMultichan(), steam::engine::test::ont::generateMultichan(), steam::engine::test::ont::manipulateMultichan(), and RandomSequencer< GEN >::u64().

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processing_manipulateFrame()

void processing_manipulateFrame ( )
inlineprivate
Test:
function to apply a numeric computation to test data frames;
Remarks
here basically the same hash-chaining is used as for #manipulateMultichan, but only one hash-chain per data point is used and output is written to a different buffer.

Definition at line 212 of file node-devel-test.cpp.

References lib::hash::combine(), steam::engine::test::ont::manipulateFrame(), and RandomSequencer< GEN >::u64().

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processing_combineFrames()

void processing_combineFrames ( )
inlineprivate
Test:
function to mix two test data frames

Definition at line 249 of file node-devel-test.cpp.

References steam::engine::test::ont::combineFrames(), RandomSequencer< GEN >::u64(), and RandomSequencer< GEN >::uni().

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testRand_simpleUsage()

void testRand_simpleUsage ( )
inlineprivate
Test:
demonstrate simple usage of test-render setup

Definition at line 290 of file node-devel-test.cpp.

References BuffHandle::accessAs(), DiagnosticBufferProvider::build(), BufferProvider::getDescriptorFor(), TestFrame::isPristine(), TestFrame::isSane(), BufferProvider::lockBuffer(), steam::engine::prepareNode(), BuffHandle::release(), steam::engine::test::testRand, RandomSequencer< GEN >::u64(), steam::engine::watch(), and Time::ZERO.

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeSrcNode()

static ProcNode makeSrcNode ( ont::FraNo  frameNr,
ont::Flavr  flavour 
)
inlinestaticprivate

shortcut to simplify the following test cases

Definition at line 342 of file node-devel-test.cpp.

References steam::engine::prepareNode(), and steam::engine::test::testRand.

Referenced by NodeDevel_test::testRand_buildFilterNode(), and NodeDevel_test::testRand_buildMixNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testRand_buildFilterNode()

void testRand_buildFilterNode ( )
inlineprivate
Test:
use the »TestRand«-framework to setup a filter node
  • implementation is backed by the ont::manipulateFrame() function
  • it thus operates on TestFrame data and results can be verified
  • the generated spec-recod provides a processing-functor binding and node-spec
  • can build and wire a Node processing chain with a source node and a »filter« node based on this data manipulation, which exactly reproduces the data content generated by the stand-alone invocation.
Remarks
such a test-setup thus not only allows to prove that the function was invoked, but also the order in which the processing took place, due to hash-chaining applied to every single data word in the TestFrame buffer.
See also
NodeLink_test::trigger_node_port_invocation()

Definition at line 369 of file node-devel-test.cpp.

References BuffHandle::accessAs(), DiagnosticBufferProvider::build(), BufferProvider::getDescriptorFor(), TestFrame::isPristine(), TestFrame::isValid(), BufferProvider::lockBuffer(), NodeDevel_test::makeSrcNode(), steam::engine::test::ont::manipulateFrame(), steam::engine::prepareNode(), BuffHandle::release(), steam::engine::test::testRand, RandomSequencer< GEN >::u64(), steam::engine::watch(), and Time::ZERO.

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testRand_buildMixNode()

void testRand_buildMixNode ( )
inlineprivate
Test:
use the »TestRand«-framework to setup a two-chain mixer node
  • demonstrate convenience setup to package the ont::combineFrames() as »mix« Node
  • this time, we need two source chains, both generating TestFrame data
  • complete processing with all steps can be verified by performing similar computations directly and comparing the result checksum.

Definition at line 443 of file node-devel-test.cpp.

References BuffHandle::accessAs(), DiagnosticBufferProvider::build(), steam::engine::test::ont::combineFrames(), BufferProvider::getDescriptorFor(), TestFrame::isValid(), BufferProvider::lockBuffer(), NodeDevel_test::makeSrcNode(), steam::engine::prepareNode(), BuffHandle::release(), steam::engine::test::testRand, RandomSequencer< GEN >::u64(), RandomSequencer< GEN >::uni(), steam::engine::watch(), and Time::ZERO.

Referenced by NodeDevel_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for NodeDevel_test:
+ Collaboration diagram for NodeDevel_test:

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