Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 195 of file test-mutation-target.hpp.

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Friends

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

Private Types

using VecG = std::vector< GenNode >
 

Private Attributes

VecG content_
 
EventLog log_
 
VecG prev_content_
 

Additional Inherited Members

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

Member Typedef Documentation

using VecG = std::vector<GenNode>
private

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

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

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

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

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

Member Function Documentation

const_iterator begin ( ) const
inline

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

References TestMutationTarget::content_, and lib::iter_stl::eachElm().

Referenced by TestMutationTarget::showContent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const_iterator end ( ) const
inline

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

iterator srcIter ( )
inline

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

References lib::iter_stl::eachElm(), and TestMutationTarget::prev_content_.

Referenced by TestMutationTarget::initMutation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

iterator lastElm ( )
inline

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

References TestMutationTarget::content_.

Referenced by TestMutationTarget::locate().

+ Here is the caller graph for this function:

iterator initMutation ( string  mutatorID)
inline

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

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

+ Here is the call graph for this function:

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

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

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

+ Here is the call graph for this function:

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

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

Referenced by TestMutationTarget::locate().

+ Here is the caller graph for this function:

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

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

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

+ Here is the call graph for this function:

void logSkip ( GenNode const &  content)
inline

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

References lib::meta::BOTTOM_INDICATOR, EventLog::event(), BareEntryID::getSym(), GenNode::idi, util::isnil(), and TestMutationTarget::log_.

+ Here is the call graph for this function:

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

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

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

+ Here is the call graph for this function:

void logMutation ( GenNode const &  target)
inline

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

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

+ Here is the call graph for this function:

void logScopeCompletion ( iterator  processingPos)
inline

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

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

+ Here is the call graph for this function:

bool empty ( ) const
inline

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

References TestMutationTarget::content_.

Referenced by TestMutationTarget::locate().

+ Here is the caller graph for this function:

string showContent ( ) const
inline

render payload content for diagnostics

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

References TestMutationTarget::begin(), util::join(), 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:

string showSrcBuffer ( ) const
inline

render elements waiting in source buffer to be accepted

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

References lib::iter_stl::eachElm(), util::join(), 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:

EventMatch verify ( string  match) const
inline

Definition at line 312 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:

EventMatch verifyMatch ( string  regExp) const
inline

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

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

+ Here is the call graph for this function:

EventMatch verifyEvent ( string  match) const
inline

Definition at line 324 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:

EventMatch verifyEvent ( string  classifier,
string  match 
) const
inline

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

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

+ Here is the call graph for this function:

EventMatch verifyCall ( string  match) const
inline

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

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

+ Here is the call graph for this function:

EventMatch ensureNot ( string  match) const
inline

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

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

+ Here is the call graph for this function:

EventLog const& getLog ( ) const
inline

Definition at line 348 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(), and TestMutationTarget::verifyMatch().

+ Here is the caller graph for this function:

Member Data Documentation

Friends And Related Function Documentation

const_iterator begin ( TestMutationTarget const &  target)
friend

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

const_iterator end ( TestMutationTarget const &  target)
friend

Definition at line 218 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: