47 Scope startScope(elm);
52 using LERR_(NO_PARENT_SCOPE);
94 for (_Iter ii = contents_of_testSession(sess); ii; ++ii)
97 CHECK (elm.isValid());
99 cout <<
"Scope: " << scope1 << endl;
107 CHECK (scope1 == scopeTop);
108 CHECK (scope2 == scopeTop);
109 CHECK (scope1 == scope2);
111 CHECK (!isSameObject (scope1,scope2));
126 CHECK (scope1 == scope2); CHECK (scope2 == scope1);
127 CHECK (scope1 != nil); CHECK (nil != scope1);
128 CHECK (scope2 != nil); CHECK (nil != scope2);
130 CHECK (aPlac == scope1); CHECK (scope1 == aPlac);
131 CHECK (aPlac == scope2); CHECK (scope2 == aPlac);
132 CHECK (aPlac != nil); CHECK (nil != aPlac);
135 CHECK (scope1 != par); CHECK (par != scope1);
136 CHECK (scope2 != par); CHECK (par != scope2);
157 for (_Iter elm = contents_of_testSession(sess); elm; ++elm)
159 _Iter pathIter = pathToRoot(*elm);
162 CHECK (*pathIter ==
Scope(*elm));
164 for ( ; pathIter; ++pathIter)
166 Scope sco(*pathIter);
173 CHECK (isSameObject (top,root));
181 CHECK (topsTop == parentsScope);
182 CHECK (isSameObject (topsTop, parentsScope.
getTop()));
MObject is the interface class for all "Media Objects".
static lib::Depend< ScopeLocator > instance
Storage holding the single ScopeLocator instance.
A Placement scope within the high-level-model.
static Scope containing(PlacementMO const &aPlacement)
discover the enclosing scope of a given Placement
PlacementMO & getTop() const
Scope getParent() const
retrieve the parent scope which encloses this scope.
void verifyNavigation(PPIdx sess)
void verifyLookup(PPIdx sess)
Core abstraction of the Session model: a media object.
_Iter pathToRoot(PlacementMO &elm)
_Iter contents_of_testSession(PPIdx testSession)
PPIdx build_testScopes()
helper for tests: create a pseudo-session (actually just a PlacementIndex), which contains some neste...
std::shared_ptr< PlacementIndex > PPIdx
PlacementMO & retrieve_startElm()
complement to the helper: retrieve one of the dummy placements which is a Placement<> and way down in...
ScopeQuery< MObject >::iterator _ScopeIterMO
Namespace of Session and user visible high-level objects.
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Service to build the notion of a current location within the Sesison model.
A collection of frequently used helper functions to support unit testing.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Unit test helper to generate a system of nested test scopes.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...