34 using LERR_(INVALID_SCOPE);
74 CHECK (!isnil (stack));
75 CHECK (!isnil (stack.
top()));
91 CHECK (1 == stack.
size());
96 CHECK (2 == stack.
size());
97 CHECK (secondFrame == stack.
top());
98 CHECK (secondFrame.
getLeaf() == startPoint);
108 CHECK (!stack.
top());
110 CHECK (secondFrame == stack.
top());
117 CHECK (1 == stack.
size());
118 CHECK (firstFrame == stack.
top());
134 CHECK (1 == stack.
size());
140 CHECK (3 == stack.
size());
148 CHECK (1 == stack.
size());
149 CHECK (firstFrame == stack.
top());
150 CHECK (isSameObject(newTop, firstFrame));
159 CHECK (firstFrame.
getLeaf() == startPoint);
162 CHECK (1 == stack.
size());
170 CHECK (anotherFrame2.
getLeaf() == startPoint);
173 CHECK (1 == stack.
size());
186 CHECK (1 == stack.
size());
189 ScopePath beforeInvalidNavigation = firstFrame;
190 Scope const& unrelatedScope = fabricate_invalidScope();
194 CHECK (1 == stack.
size());
200 CHECK (1 == stack.
size());
224 CHECK (10 == stack.
size());
226 CHECK (10 == stack.
size());
230 CHECK (1 == stack.
size());
A custom stack holding ScopePath »frames«.
ScopePath & push(Scope const &)
Open a new path frame, pushing down the current frame.
void pop_unused()
investigate the stack top and discard any path frames which aren't referred anymore (as indicated by ...
Sequence of nested scopes within the high-level model.
Scope const & getLeaf() const
bool empty() const
an empty path doesn't even contain a root element.
void navigate(Scope const &)
A Placement scope within the high-level-model.
void verify_errorHandling()
void automaticFrameHandling()
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...
Namespace of Session and user visible high-level objects.
void intrusive_ptr_add_ref(ScopePath *pathFrame)
management function for boost::intrusive_ptr to be picked up by ADL
void intrusive_ptr_release(ScopePath *pathFrame)
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.
bool isnil(lib::time::Duration const &dur)
Implementation facility to work with and navigate nested scopes.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
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 deliberately wrong placement scopes.
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...