48 contents_of_testSession (
PPIdx testSession)
56 Scope startScope(elm);
61 using LERR_(NO_PARENT_SCOPE);
62 using util::isSameObject;
103 for (_Iter ii = contents_of_testSession(sess); ii; ++ii)
106 CHECK (elm.isValid());
108 cout <<
"Scope: " << scope1 << endl;
116 CHECK (scope1 == scopeTop);
117 CHECK (scope2 == scopeTop);
118 CHECK (scope1 == scope2);
120 CHECK (!isSameObject (scope1,scope2));
135 CHECK (scope1 == scope2); CHECK (scope2 == scope1);
136 CHECK (scope1 != nil); CHECK (nil != scope1);
137 CHECK (scope2 != nil); CHECK (nil != scope2);
139 CHECK (aPlac == scope1); CHECK (scope1 == aPlac);
140 CHECK (aPlac == scope2); CHECK (scope2 == aPlac);
141 CHECK (aPlac != nil); CHECK (nil != aPlac);
144 CHECK (scope1 != par); CHECK (par != scope1);
145 CHECK (scope2 != par); CHECK (par != scope2);
148 CHECK (aPlac.
getID() == placm2.getID());
151 CHECK (aPlac.
getID() != parPlac.getID());
166 for (_Iter elm = contents_of_testSession(sess); elm; ++elm)
168 _Iter pathIter = pathToRoot(*elm);
171 CHECK (*pathIter ==
Scope(*elm));
173 for ( ; pathIter; ++pathIter)
175 Scope sco(*pathIter);
182 CHECK (isSameObject (top,root));
190 CHECK (topsTop == parentsScope);
191 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)
Simple 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. ...