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

#include "lib/diff/test-mutation-target.hpp"

Description

Test adapter to watch and verify how the TreeMutator binds to custom tree data structures.

As a data structure, the TestMutationTarget builds an »External Tree Description« reflecting the actual data structure, as can be inferred through listening to all handled diff mutation primitives. Besides, each of these primitives is recorded in the embedded EventLog.

See also
TreeMutatorBinding_test::mutateDummy()

Definition at line 186 of file test-mutation-target.hpp.

Public Types

using iterator = iter_stl::_SeqT< VecG >::Range
 
using const_iterator = iter_stl::_SeqT< const VecG >::Range
 

Static Public Member Functions

static iterator search (GenNode::ID const &targetID, iterator pos)
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
iterator srcIter ()
 
iterator lastElm ()
 
iterator initMutation (string mutatorID)
 
void inject (GenNode &&elm, string operationID)
 
iterator locate (GenNode::ID const &targetID)
 
void logSkip (GenNode const &content)
 
void logAssignment (GenNode const &target, string oldPayload)
 
void logMutation (GenNode const &target)
 
void logScopeCompletion (iterator processingPos)
 
bool empty () const
 
string showContent () const
 render payload content for diagnostics
 
string showSrcBuffer () const
 render elements waiting in source buffer to be accepted
 
EventMatch verify (string match) const
 
EventMatch verifyMatch (string regExp) const
 
EventMatch verifyEvent (string match) const
 
EventMatch verifyEvent (string classifier, string match) const
 
EventMatch verifyCall (string match) const
 
EventMatch ensureNot (string match) const
 
EventLog const & getLog () const
 

Friends

const_iterator begin (TestMutationTarget const &target)
 
const_iterator end (TestMutationTarget const &target)
 

Private Types

using VecG = std::vector< GenNode >
 

Private Attributes

EventLog log_ {identify (this)}
 
VecG content_ {}
 
VecG prev_content_ {}
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Typedef Documentation

◆ VecG

using VecG = std::vector<GenNode>
private

Definition at line 189 of file test-mutation-target.hpp.

◆ iterator

using iterator = iter_stl::_SeqT<VecG>::Range

Definition at line 198 of file test-mutation-target.hpp.

◆ const_iterator

using const_iterator = iter_stl::_SeqT<const VecG>::Range

Definition at line 199 of file test-mutation-target.hpp.

Member Function Documentation

◆ begin()

const_iterator begin ( ) const
inline

Definition at line 201 of file test-mutation-target.hpp.

References TestMutationTarget::content_.

Referenced by TestMutationTarget::showContent().

+ Here is the caller graph for this function:

◆ end()

const_iterator end ( ) const
inline

Definition at line 202 of file test-mutation-target.hpp.

◆ srcIter()

iterator srcIter ( )
inline

Definition at line 204 of file test-mutation-target.hpp.

References TestMutationTarget::prev_content_.

Referenced by TestMutationTarget::initMutation().

+ Here is the caller graph for this function:

◆ lastElm()

iterator lastElm ( )
inline

Definition at line 205 of file test-mutation-target.hpp.

References TestMutationTarget::content_.

Referenced by TestMutationTarget::locate().

+ Here is the caller graph for this function:

◆ initMutation()

iterator initMutation ( string  mutatorID)
inline

Definition at line 216 of file test-mutation-target.hpp.

References TestMutationTarget::content_, EventLog::event(), TestMutationTarget::log_, TestMutationTarget::prev_content_, and TestMutationTarget::srcIter().

Referenced by TestWireTap< PAR >::init().

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

◆ inject()

void inject ( GenNode &&  elm,
string  operationID 
)
inline

Definition at line 225 of file test-mutation-target.hpp.

References TestMutationTarget::content_, EventLog::event(), and TestMutationTarget::log_.

Referenced by TestWireTap< PAR >::accept_until(), TestWireTap< PAR >::acceptSrc(), TestWireTap< PAR >::findSrc(), and TestWireTap< PAR >::injectNew().

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

◆ search()

static iterator search ( GenNode::ID const &  targetID,
iterator  pos 
)
inlinestatic

Definition at line 232 of file test-mutation-target.hpp.

Referenced by TestMutationTarget::locate().

+ Here is the caller graph for this function:

◆ locate()

iterator locate ( GenNode::ID const &  targetID)
inline

Definition at line 240 of file test-mutation-target.hpp.

References TestMutationTarget::content_, TestMutationTarget::empty(), TestMutationTarget::lastElm(), and TestMutationTarget::search().

Referenced by TestWireTap< PAR >::assignElm(), and TestWireTap< PAR >::mutateChild().

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

◆ logSkip()

void logSkip ( GenNode const &  content)
inline

Definition at line 249 of file test-mutation-target.hpp.

References EventLog::event(), BareEntryID::getSym(), GenNode::idi, and TestMutationTarget::log_.

Referenced by TestWireTap< PAR >::skipSrc().

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

◆ logAssignment()

void logAssignment ( GenNode const &  target,
string  oldPayload 
)
inline

Definition at line 255 of file test-mutation-target.hpp.

References GenNode::data, EventLog::event(), BareEntryID::getSym(), GenNode::idi, and TestMutationTarget::log_.

Referenced by TestWireTap< PAR >::assignElm().

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

◆ logMutation()

void logMutation ( GenNode const &  target)
inline

Definition at line 264 of file test-mutation-target.hpp.

References GenNode::data, EventLog::event(), BareEntryID::getSym(), GenNode::idi, and TestMutationTarget::log_.

Referenced by TestWireTap< PAR >::mutateChild().

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

◆ logScopeCompletion()

void logScopeCompletion ( iterator  processingPos)
inline

Definition at line 272 of file test-mutation-target.hpp.

References EventLog::event(), TestMutationTarget::log_, and TestMutationTarget::prev_content_.

Referenced by TestWireTap< PAR >::completeScope().

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

◆ empty()

bool empty ( ) const
inline

Definition at line 283 of file test-mutation-target.hpp.

References TestMutationTarget::content_.

Referenced by TestMutationTarget::locate().

+ Here is the caller graph for this function:

◆ showContent()

string showContent ( ) const
inline

render payload content for diagnostics

Definition at line 290 of file test-mutation-target.hpp.

References TestMutationTarget::begin(), and lib::transformIterator().

Referenced by TreeMutatorBinding_test::mutateAttribute(), and TreeMutatorBinding_test::mutateDummy().

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

◆ showSrcBuffer()

string showSrcBuffer ( ) const
inline

render elements waiting in source buffer to be accepted

Definition at line 297 of file test-mutation-target.hpp.

References TestMutationTarget::prev_content_, and lib::transformIterator().

Referenced by TreeMutatorBinding_test::mutateDummy().

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

◆ verify()

EventMatch verify ( string  match) const
inline

Definition at line 303 of file test-mutation-target.hpp.

References TestMutationTarget::getLog(), and EventLog::verify().

Referenced by TreeMutatorBinding_test::mutateDummy().

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

◆ verifyMatch()

EventMatch verifyMatch ( string  regExp) const
inline

Definition at line 309 of file test-mutation-target.hpp.

References TestMutationTarget::getLog(), and EventLog::verifyMatch().

+ Here is the call graph for this function:

◆ verifyEvent() [1/2]

EventMatch verifyEvent ( string  match) const
inline

Definition at line 315 of file test-mutation-target.hpp.

References TestMutationTarget::getLog(), and EventLog::verifyEvent().

Referenced by TreeMutatorBinding_test::mutateDummy().

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

◆ verifyEvent() [2/2]

EventMatch verifyEvent ( string  classifier,
string  match 
) const
inline

Definition at line 321 of file test-mutation-target.hpp.

References TestMutationTarget::getLog(), and EventLog::verifyEvent().

+ Here is the call graph for this function:

◆ verifyCall()

EventMatch verifyCall ( string  match) const
inline

Definition at line 327 of file test-mutation-target.hpp.

References TestMutationTarget::getLog(), and EventLog::verifyCall().

+ Here is the call graph for this function:

◆ ensureNot()

EventMatch ensureNot ( string  match) const
inline

Definition at line 333 of file test-mutation-target.hpp.

References EventLog::ensureNot(), and TestMutationTarget::getLog().

+ Here is the call graph for this function:

◆ getLog()

EventLog const & getLog ( ) const
inline

Definition at line 339 of file test-mutation-target.hpp.

References TestMutationTarget::log_.

Referenced by TestMutationTarget::ensureNot(), TreeMutatorBinding_test::mutateAttribute(), TreeMutatorBinding_test::mutateDummy(), TestMutationTarget::verify(), TestMutationTarget::verifyCall(), TestMutationTarget::verifyEvent(), TestMutationTarget::verifyEvent(), and TestMutationTarget::verifyMatch().

+ Here is the caller graph for this function:

Member Data Documentation

◆ log_

◆ content_

◆ prev_content_

Friends And Related Symbol Documentation

◆ begin

const_iterator begin ( TestMutationTarget const &  target)
friend

Definition at line 208 of file test-mutation-target.hpp.

◆ end

const_iterator end ( TestMutationTarget const &  target)
friend

Definition at line 209 of file test-mutation-target.hpp.

+ Inheritance diagram for TestMutationTarget:
+ Collaboration diagram for TestMutationTarget:

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