![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Implementation of a dummy render job for unit tests. More...
Go to the source code of this file.
Implementation of a dummy render job for unit tests.
Based on using a specifically rigged DummyClosure as JobFunctor, where the actual Job invocation does nothing other than storing the invocation mark and parameters into a invocationLog_ table. Together with the likewise specifically rigged steam::engine::test::MockJobTicket, the invocation hash can be marked, which allows to prove after the invocation that a given Segment or JobTicket actually generated a specific Job, which was then invoked with specific parameters.
A MockJob can directly created, and then sliced down to the Job baseclass, since it has no additional data fields. The static functions in MockJob allow to verify that a given job instance was created from this setup, that it was invoked, and verify invocation time and extract data
Definition in file mock-dispatcher.cpp.
#include "steam/engine/mock-dispatcher.hpp"#include "vault/gear/nop-job-functor.hpp"#include "lib/test/test-helper.hpp"#include "lib/time/timevalue.hpp"#include "vault/real-clock.hpp"#include "lib/hash-combine.hpp"#include "lib/null-value.hpp"#include "lib/depend.hpp"#include "lib/util.hpp"#include <functional>#include <unordered_map>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{mock-dispatcher.cpp} |
Classes | |
| class | DummyClosure |
| MockJob objects are backed by this closure. More... | |
| struct | DummyClosure::Invocation |
Functions | |
| const int | MAX_PARAM_A (1000) |
| random test values 0...1000 | |
| const int | MAX_PARAM_B (10) |
| random test values -10...+10 | |
Variables | |
| DummyClosure | dummyClosure |
| actual instance of the test dummy job functor | |
| lib::Depend< vault::gear::NopJobFunctor > | nopFunctor |
| access to the fallback-implementation for empty segments | |