39 contents_of_testSession (
PPIdx testSession)
47 Scope startScope(elm);
52 using LERR_(NO_PARENT_SCOPE);
53 using util::isSameObject;
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);
139 CHECK (aPlac.
getID() == placm2.getID());
142 CHECK (aPlac.
getID() != parPlac.getID());
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()));
Scope getParent() const
retrieve the parent scope which encloses this scope.
PPIdx build_testScopes()
helper for tests: create a pseudo-session (actually just a PlacementIndex), which contains some neste...
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Core abstraction of the Session model: a media object.
static Scope containing(PlacementMO const &aPlacement)
discover the enclosing scope of a given Placement
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
A Placement scope within the high-level-model.
MObject is the interface class for all "Media Objects".
PlacementMO & retrieve_startElm()
complement to the helper: retrieve one of the dummy placements which is a Placement<> and way down in...
Unit test helper to generate a system of nested test scopes.
void verifyNavigation(PPIdx sess)
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
void verifyLookup(PPIdx sess)
A collection of frequently used helper functions to support unit testing.
Service to build the notion of a current location within the Sesison model.
static lib::Depend< ScopeLocator > instance
Storage holding the single ScopeLocator instance.
Adapter for building an implementation of the »Lumiera Forward Iterator« concept. ...