37 using namespace mobject::test;
40 using LERR_(NOT_IN_SESSION);
41 using LERR_(BOTTOM_PLACEMENTREF);
43 using PSub = TestPlacement<TestSubMO21>;
44 using P_ID = PlacementMO::ID;
70 testPlacement2.chain (twoSec);
74 PMO& root = index->getRoot();
76 P_ID id1 = index->insert (testPlacement1, root);
77 P_ID tmpID = index->insert (testPlacement2, root);
78 CHECK (2 == index->size());
81 PMO& p1 = index->find(id1);
82 PMO& p2 = index->find(tmpID);
84 PlacementMO::Id<TestSubMO21> id2 = p2.recastID<
TestSubMO21>();
86 CHECK (id2 != p1.getID());
101 CHECK (isSameObject (p1, *ref1));
102 CHECK (isSameObject (p2, *ref2));
103 CHECK (isSameObject (p2, *refX));
105 cout << *ref1 << endl;
106 cout << *ref2 << endl;
107 cout << *refX << endl;
111 CHECK (2 == ref1.use_count());
112 CHECK (2 == ref2.use_count());
114 CHECK (exPla.time == twoSec);
115 CHECK (3 == ref2.use_count());
117 CHECK (index->contains(ref1));
118 CHECK (
sizeof(id2) ==
sizeof(ref2));
122 CHECK (ref1 != ref2);
123 CHECK (ref1 == refX);
124 CHECK (ref2 != refX);
128 CHECK (refX == ref2);
129 CHECK (isSameObject (*refX, p2));
131 CHECK (refX == ref1);
132 CHECK (refX != ref2);
133 CHECK (isSameObject (*refX, p1));
135 LumieraUid luid2 (p2.
getID().get());
139 CHECK (isSameObject (p1, *ref2));
140 CHECK (isSameObject (p2, *ref1));
144 CHECK (isSameObject (p1, *ref1));
145 CHECK (isSameObject (p1, *refX));
146 CHECK (isSameObject (p2, *ref2));
147 CHECK (ref1 != ref2);
148 CHECK (ref1 == refX);
149 CHECK (ref2 != refX);
152 CHECK (refX.resolve().time == lib::time::Time::MIN);
154 CHECK (refX.resolve().time == twoSec);
156 CHECK (p1.getID() != p2.
getID());
157 CHECK (2 == ref1.use_count());
158 CHECK (3 == ref2.use_count());
162 index->remove (ref1);
171 VERIFY_ERROR(BOTTOM_PLACEMENTREF, bottom->specialAPI() );
175 CHECK (1 == index->size());
176 CHECK (index->isValid());
Reference tag denoting a placement attached to the session.
Core abstraction: completely resolved placement of an MObject Within the session model, all media objects are attached with the help of mobject::Placement elements.
Core abstraction: placement of a media object into session context.
Special kind of Placement, where the location of the MObject has been nailed down to a fixed position...
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Lumiera's internal time value datatype.
Core of the session implementation datastructure.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A collection of frequently used helper functions to support unit testing.
A hierarchy of simple dummy-Media-Objects for easy unit testing.
Implementation level session API: PlacementIndex mock for tests.
A generic reference mechanism for Placements, as added to the current session.
static PPIdx install()
Re-define the implicit PlacementIndex temporarily, e.g.
a family of time value like entities and their relationships.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities. ...