Lumiera  0.pre.03
»edit your freedom«
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

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

Member Function Documentation

◆ 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(), and VERIFY_ERROR.

+ Here is the call 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.

+ Inheritance diagram for ScopePath_test:
+ Collaboration diagram for ScopePath_test:

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