![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "/Werk/devel/lumi/tests/core/steam/engine/mock-dispatcher.hpp"
Mock setup for a JobTicket to generate dummy render Job invocations.
Implemented as subclass, it provides a specification DSL for tests, and is able to probe some otherwise opaque internals of JobTicket. Beyond that, MockJobTicket has the same storage size; and behaves like the regular JobTicket after construction – but any Job created by JobTicket::createJobFor(nominalTime) will be wired with the MockJob functor and can thus be related back to the test specification setup.
Definition at line 136 of file mock-dispatcher.hpp.
Static Public Member Functions | |
| static bool | isAssociated (Job const &, JobTicket const &) |
| convenience shortcut to perform this test on arbitrary JobTicket and Job instances. | |
Public Member Functions | |
| MockJobTicket () | |
| MockJobTicket (HashVal seed) | |
| bool | verify_associated (Job const &) const |
| verify the given job instance was actually generated from this JobTicket. | |
Public Member Functions inherited from JobTicket | |
| template<class ALO > | |
| JobTicket (ExitNode const &exitNode, ALO &allocator) | |
| bool | empty () const |
| bool | isValid () const |
| auto | getPrerequisites () |
| Core operation: iterate over the prerequisites, required to carry out a render operation based on this blueprint. | |
| Job | createJobFor (Time nominalTime) |
| Core operation: build a concrete render job based on this blueprint. | |
| Duration | getExpectedRuntime () |
| Core operation: guess expected runtime for rendering. | |
Private Member Functions | |
| auto & | allocator () |
Private Member Functions inherited from AllocatorHandle< JobTicket > | |
| JobTicket & | operator() (ARGS &&...args) |
| ~AllocatorHandle () | |
Static Private Member Functions | |
| static ExitNode | defineSimpleSpec (HashVal seed=ranHash()) |
| provide a test specification wired to MockJob | |
Additional Inherited Members | |
Static Public Attributes inherited from JobTicket | |
| static JobTicket | NOP {} |
| special »do nothing« JobTicket marker | |
Protected Member Functions inherited from JobTicket | |
| bool | verifyInstance (JobFunctor &, InvocationInstanceID const &, Time) const |
| Helper for tests: verify the given invocation parameters match this JobTicket. | |
Static Protected Member Functions inherited from JobTicket | |
| static InvocationInstanceID | timeHash (Time, InvocationInstanceID const &) |
| Tag the precomputed invocation ID with the nominal frame time. | |
|
inline |
Definition at line 156 of file mock-dispatcher.hpp.
|
inline |
Definition at line 160 of file mock-dispatcher.hpp.
|
inlineprivate |
Definition at line 141 of file mock-dispatcher.hpp.
|
inlinestaticprivate |
provide a test specification wired to MockJob
Definition at line 148 of file mock-dispatcher.hpp.
References MockJob::getFunctor().
Here is the call graph for this function:
|
inline |
verify the given job instance was actually generated from this JobTicket.
Definition at line 284 of file mock-dispatcher.hpp.
References JobTicket::isValid(), and JobTicket::verifyInstance().
Referenced by MockJobTicket::isAssociated(), and MockSupport_test::verify_MockJobTicket().
Here is the call graph for this function:
Here is the caller graph for this function:convenience shortcut to perform this test on arbitrary JobTicket and Job instances.
Definition at line 300 of file mock-dispatcher.hpp.
References MockJobTicket::verify_associated().
Referenced by JobPlanningPipeline_test::demonstrateScaffolding(), MockSupport_test::simpleUsage(), MockDispatcher::verify(), and MockSupport_test::verify_MockSegmentation().
Here is the call graph for this function:
Here is the caller graph for this function:
Inheritance diagram for MockJobTicket:
Collaboration diagram for MockJobTicket: