Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
ScopePath_test Class Reference

Description

Test:
properties and behaviour of the path of nested scopes. Using a pseudo-session (actually just a PlacementIndex), this test creates some nested scopes, builds scope paths and executes various comparisons navigation moves on them. Especially detection of invalid scopes and paths and the special handling of empty and root paths is covered.
See also
mobject::Placement
mobject::session::ScopePath
mobject::session::QueryFocus

Definition at line 58 of file scope-path-test.cpp.

Private Member Functions

virtual void run (Arg)
 
ScopePath buildPath (PMO &startPla)
 
void checkInvalidScopeDetection ()
 
void checkIteration (ScopePath path, PMO &refPlacement)
 
void checkRelations (ScopePath path1, PMO &refPlacement)
 
void rootPath (ScopePath refPath)
 
void invalidPath (ScopePath refPath, PMO &refPlacement)
 
void check_Identity_and_Copy (PMO &refPlacement)
 
void check_RefcountProtection (PMO &refPlacement)
 
void navigate (const ScopePath refPath, PPIdx index)
 
void clear (ScopePath &path, PPIdx index)
 

Member Function Documentation

◆ run()

◆ buildPath()

ScopePath buildPath ( PMO startPla)
inlineprivate

Definition at line 82 of file scope-path-test.cpp.

References ScopePath::contains(), and ScopePath::getLeaf().

Referenced by ScopePath_test::run().

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

◆ checkInvalidScopeDetection()

void checkInvalidScopeDetection ( )
inlineprivate

Definition at line 99 of file scope-path-test.cpp.

References ScopePath::empty(), Scope::INVALID, ScopePath::isValid(), Scope::isValid(), and VERIFY_ERROR.

Referenced by ScopePath_test::run().

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

◆ checkIteration()

void checkIteration ( ScopePath  path,
PMO refPlacement 
)
inlineprivate

Definition at line 119 of file scope-path-test.cpp.

References ScopePath::begin(), and Scope::getParent().

+ Here is the call graph for this function:

◆ checkRelations()

void checkRelations ( ScopePath  path1,
PMO refPlacement 
)
inlineprivate

Definition at line 133 of file scope-path-test.cpp.

References steam::mobject::session::commonPrefix(), ScopePath::contains(), steam::mobject::session::disjoint(), ScopePath::endsAt(), Scope::getParent(), and ScopePath::moveUp().

Referenced by ScopePath_test::run().

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

◆ rootPath()

void rootPath ( ScopePath  refPath)
inlineprivate

Definition at line 164 of file scope-path-test.cpp.

References ScopePath::empty(), ScopePath::goRoot(), ScopePath::isValid(), and ScopePath::length().

Referenced by ScopePath_test::run().

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

◆ invalidPath()

void invalidPath ( ScopePath  refPath,
PMO refPlacement 
)
inlineprivate

Definition at line 180 of file scope-path-test.cpp.

References steam::mobject::session::commonPrefix(), ScopePath::contains(), ScopePath::empty(), ScopePath::endsAt(), ScopePath::goRoot(), ScopePath::INVALID, Scope::isValid(), ScopePath::length(), ScopePath::moveUp(), ScopePath::navigate(), and VERIFY_ERROR.

Referenced by ScopePath_test::run().

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

◆ check_Identity_and_Copy()

void check_Identity_and_Copy ( PMO refPlacement)
inlineprivate

Definition at line 223 of file scope-path-test.cpp.

References ScopePath::contains(), ScopePath::getLeaf(), Scope::getParent(), ScopePath::INVALID, and ScopePath::moveUp().

Referenced by ScopePath_test::run().

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

◆ check_RefcountProtection()

void check_RefcountProtection ( PMO refPlacement)
inlineprivate
Test:
the embedded refcount is handled sensibly when it comes to copying. (This refcount is used by QueryFocusStack)

Definition at line 264 of file scope-path-test.cpp.

References steam::mobject::session::intrusive_ptr_add_ref(), steam::mobject::session::intrusive_ptr_release(), ScopePath::moveUp(), ScopePath::ref_count(), and VERIFY_ERROR.

Referenced by ScopePath_test::run().

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

◆ navigate()

void navigate ( const ScopePath  refPath,
PPIdx  index 
)
inlineprivate
Test:
modify a path by navigating it.
  • move one step above the current leaf
  • move up to the root element
  • move back to the parent and verify we're just above the leaf
  • attach a new sibling node and move the path down to there
  • extract the common prefix, which should again point to the parent
  • find a placement in a completely separate branch (only sharing the root node). Navigate to there and verify root is the common prefix.

Definition at line 307 of file scope-path-test.cpp.

References __SHOWPATH, steam::mobject::session::commonPrefix(), ScopePath::contains(), steam::mobject::session::disjoint(), ScopePath::endsAt(), steam::mobject::session::test::explore_testScope(), ScopePath::getLeaf(), Scope::getParent(), Scope::getTop(), ScopePath::goRoot(), ScopePath::moveUp(), ScopePath::navigate(), steam::mobject::session::test::retrieve_firstTestSubMO21(), and VERIFY_ERROR.

Referenced by ScopePath_test::run().

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

◆ clear()

void clear ( ScopePath path,
PPIdx  index 
)
inlineprivate

Definition at line 383 of file scope-path-test.cpp.

References ScopePath::clear(), and ScopePath::getLeaf().

Referenced by ScopePath_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for ScopePath_test:
+ Collaboration diagram for ScopePath_test:

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