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

Description

Test:
validate test support for render job planning and dispatch.
  • creating and invoking mock render jobs
  • a mocked JobTicket, generating mock render jobs
  • configurable test setup for a mocked Segmentation datastructure
  • configurable setup of a complete frame Dispatcher
See also
JobPlanningPipeline_test
Dispatcher
vault::gear::Job
steam::fixture::Segmentation

Definition at line 53 of file mock-support-test.cpp.

Private Member Functions

virtual void run (Arg)
 
void simpleUsage ()
 
void verify_MockJob ()
 
void verify_MockJobTicket ()
 
void verify_MockSegmentation ()
 
void verify_MockPrerequisites ()
 
void verify_MockDispatcherSetup ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Test
static string firstTok (Arg)
 conveniently pick the first token from the argument line
 
static uint firstVal (Arg, uint=1)
 conveniently use some number given as argument, with optional default
 
- Public Member Functions inherited from Test
virtual ~Test ()=default
 this is an interface
 
virtual void run (Arg arg)=0
 
void seedRand ()
 draw a new random seed from a common nucleus, and re-seed the default-Gen.
 
lib::Random makeRandGen ()
 build a dedicated new RandomGen, seeded from the default-Gen
 

Member Function Documentation

◆ run()

virtual void run ( Arg  )
inlineprivatevirtual

Definition at line 57 of file mock-support-test.cpp.

References Test::seedRand(), MockSupport_test::simpleUsage(), MockSupport_test::verify_MockDispatcherSetup(), MockSupport_test::verify_MockJob(), MockSupport_test::verify_MockJobTicket(), MockSupport_test::verify_MockPrerequisites(), and MockSupport_test::verify_MockSegmentation().

+ Here is the call graph for this function:

◆ simpleUsage()

void simpleUsage ( )
inlineprivate
Test:
simple usage example of the test helpers

Definition at line 72 of file mock-support-test.cpp.

References Record< VAL >::Mutator::attrib(), JobTicket::createJobFor(), MockJobTicket::isAssociated(), Segment::jobTicket(), Job::triggerJob(), and MockJob::was_invoked().

Referenced by MockSupport_test::run().

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

◆ verify_MockJob()

void verify_MockJob ( )
inlineprivate
Test:
document and verify usage of a mock render job

Definition at line 96 of file mock-support-test.cpp.

References MockJob::invocationAdditionalKey(), MockJob::invocationNominalTime(), MockJob::invocationTime(), MockJob::was_invoked(), and RealClock::wasRecently().

Referenced by MockSupport_test::run().

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

◆ verify_MockJobTicket()

void verify_MockJobTicket ( )
inlineprivate
Test:
document and verify usage of a mock JobTicket for frame dispatch

Definition at line 120 of file mock-support-test.cpp.

References JobTicket::createJobFor(), JobTicket::empty(), INSTANCEOF, MockJob::isNopJob(), lumiera_invokey_eq(), JobTicket::NOP, and MockJobTicket::verify_associated().

Referenced by MockSupport_test::run().

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

◆ verify_MockSegmentation()

void verify_MockSegmentation ( )
inlineprivate
Test:
document and verify usage of a complete mocked Segmentation to back frame dispatch
  • default constructed: empty Segmentation
  • cover the whole axis with one segment
  • partition axis and verify the association of generated jobs
  • a fully defined segment within an otherwise empty axis
  • complex partitioning (using the »split-splice« mechanism

Definition at line 151 of file mock-support-test.cpp.

References Record< VAL >::Mutator::attrib(), JobTicket::createJobFor(), JobTicket::empty(), Segment::empty(), Record< VAL >::Mutator::genNode(), MockJob::invocationAdditionalKey(), MockJob::invocationNominalTime(), MockJob::invocationTime(), MockJobTicket::isAssociated(), util::isSameObject(), Segment::jobTicket(), lumiera_invokey_eq(), Time::MAX, Time::MIN, JobTicket::NOP, Segmentation::size(), Job::triggerJob(), MockJob::was_invoked(), RealClock::wasRecently(), and Time::ZERO.

Referenced by MockSupport_test::run().

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

◆ verify_MockPrerequisites()

void verify_MockPrerequisites ( )
inlineprivate
Test:
build a Segment with additional prerequisites, resulting in additional JobTickets to explore and additional prerequisite Jobs to build for each frame.

Definition at line 306 of file mock-support-test.cpp.

References Record< VAL >::Mutator::attrib(), JobTicket::createJobFor(), lib::explore(), Record< VAL >::Mutator::genNode(), JobTicket::getPrerequisites(), MockJob::invocationAdditionalKey(), util::join(), Record< VAL >::Mutator::scope(), Job::triggerJob(), and Time::ZERO.

Referenced by MockSupport_test::run().

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

◆ verify_MockDispatcherSetup()

void verify_MockDispatcherSetup ( )
inlineprivate
Test:
verify setup of a mocked Dispatcher instance
  • by default, MockDispatcher generates a single segment to span the whole Time-axis and with some random yet valid pipeline-ID, so that a single job ticket can be generated for each port everywhere
  • in addition, it is possible to use the same specification language as for Segmentation to define a more complex (mock)processing graph
Note
lacklustre ModelPort handling: processing graph is just duplicated for each valid model port — not clear yet if we ever need something better...

Definition at line 383 of file mock-support-test.cpp.

References Record< VAL >::Mutator::attrib(), Dispatcher::createJobFor(), Record< VAL >::Mutator::genNode(), MockDispatcher::getDummyConnection(), MockDispatcher::resolveModelPort(), and MockDispatcher::verify().

Referenced by MockSupport_test::run().

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

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