54 #include <unordered_map> 66 using std::unordered_map;
67 using util::access_or_default;
69 using vault::gear::JobParameter;
87 invokeJobOperation (JobParameter parameter)
override 89 invocationLog_[hash_value (parameter)] =
Invocation(parameter);
93 getJobKind()
const override 112 instance.part.a = seed;
120 HashVal res = hashr (invoKey.frameNumber);
136 , real{RealClock::now()}
137 , a{param.invoKey.part.a}
138 , b{param.invoKey.part.b}
144 , a{MAX_PARAM_A}, b{0}
154 queryInvocation (JobParameter param)
const 156 return access_or_default (invocationLog_, hash_value(param)
163 invocationLog_.clear();
191 Time nominalTime = lib::test::randTime();
201 invoKey.part.a = additionalKey;
209 MockJob::was_invoked (
Job const& job)
218 MockJob::invocationTime (
Job const& job)
222 return dummyClosure.queryInvocation(job.parameter).real;
227 MockJob::invocationNominalTime (
Job const& job)
231 return dummyClosure.queryInvocation(job.parameter).nominal;
236 MockJob::invocationAdditionalKey (
Job const& job)
262 return lumiera_invokey_eq (&util::unConst(job).parameter.invoKey, &empty)
263 and util::isSameObject (jobFunctor,
nopFunctor());
static const Time ANYTIME
border condition marker value. ANYTIME <= any time value
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
Mock data structures to support implementation testing of render job planning and frame dispatch...
static JobClosure & getFunctor()
Generic implementation of a JobFunctor to perform no calculations.
void combine(size_t &combinedHash, size_t additionalHash)
meld the additional hash value into the given base hash value.
Primary class template for std::hash.
Singleton holder for NIL or default value objects.
unordered_map< HashVal, Invocation > invocationLog_
recording MockJob invocations
Singleton-style holder for NIL or default values.
Steam-Layer implementation namespace root.
Access point to singletons and other kinds of dependencies designated by type.
Lumiera's internal time value datatype.
MockJob objects are backed by this closure.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A collection of frequently used helper functions to support unit testing.
static Job build()
uses random job definition values
DummyClosure dummyClosure
actual instance of the test dummy job functor
Singleton services and Dependency Injection.
lib::Depend< vault::gear::NopJobFunctor > nopFunctor
access to the fallback-implementation for empty segments
opaque ID attached to each individual job invocation.
Hash value types and utilities.
size_t HashVal
a STL compatible hash value
const int MAX_PARAM_A(1000)
random test values 0...1000
static const Time NEVER
border condition marker value. NEVER >= any time value
static bool isNopJob(Job const &)
Interface of the closure for frame rendering jobs.
const int MAX_PARAM_B(10)
random test values -10...+10
InvocationInstanceID buildInstanceID(HashVal seed) const override
Generate a specifically marked invocationKey for use in unit-tests.
render process self organisation
Individual frame rendering task, forwarding to a closure.
a family of time value like entities and their relationships.
Front-end for simplified access to the current wall clock time.
basic constant internal time value.