Lumiera
0.pre.03
»edit your freedom«
|
#include "/Werk/devel/lumi/tests/core/steam/engine/mock-dispatcher.hpp"
Mock setup for a complete Segmentation to emulate the structure of the actual fixture, without the need of building a low-level Model.
MockSegmentation instances can be instantiated directly within the test, by passing a test specification in »GenNode« notation to the constructor. This specification defines the segments to create and allows to associate a marker number, which can later be verified from the actual DummyClosure invocation.
Definition at line 193 of file mock-dispatcher.hpp.
Public Member Functions | |
MockSegmentation (std::initializer_list< GenNode > specs) | |
ExitNode | buildExitNodeFromSpec (GenNode const &spec) |
void | duplicateExitNodeSpec (uint times) |
This is some trickery to allow handling of multiple ModelPort(s) in MockDispatcher; actually the code using this mock setup does not need any elaborate differentiation of the ExitNodes structure per port, thus the first entry of the existing configuration is just duplicated for the given number of further ModelPorts. More... | |
Public Member Functions inherited from Segmentation | |
virtual | ~Segmentation () |
this is an interface | |
auto | eachSeg () const |
< More... | |
Segment const & | operator[] (TimeValue time) const |
size_t | size () const |
Segment const & | splitSplice (OptTime start, OptTime after, engine::ExitNodes &&modelLink=ExitNodes{}) |
rework the existing Segmentation to include a new Segment as specified More... | |
Private Member Functions | |
ExitNodes | buildPrerequisites (GenNode const &spec) |
Duration | buildRuntime (GenNode const &spec) |
HashVal | buildSeed (GenNode const &spec) |
Additional Inherited Members | |
Protected Member Functions inherited from Segmentation | |
void | adaptSpecification (std::function< NodeGraphAttachment(NodeGraphAttachment const &)> rewrite) |
|
inline |
This is some trickery to allow handling of multiple ModelPort(s) in MockDispatcher; actually the code using this mock setup does not need any elaborate differentiation of the ExitNodes structure per port, thus the first entry of the existing configuration is just duplicated for the given number of further ModelPorts.
helper for MockDispatcher
Definition at line 267 of file mock-dispatcher.hpp.
References Segmentation::adaptSpecification().