46 using namespace mobject::test;
49 using LERR_(NOT_IN_SESSION);
50 using LERR_(BOTTOM_PLACEMENTREF);
52 using PSub = TestPlacement<TestSubMO21>;
53 using P_ID = PlacementMO::ID;
79 testPlacement2.chain (twoSec);
83 PMO& root = index->getRoot();
85 P_ID id1 = index->insert (testPlacement1, root);
86 P_ID tmpID = index->insert (testPlacement2, root);
87 CHECK (2 == index->size());
90 PMO& p1 = index->find(id1);
91 PMO& p2 = index->find(tmpID);
93 PlacementMO::Id<TestSubMO21> id2 = p2.recastID<
TestSubMO21>();
95 CHECK (id2 != p1.getID());
106 CHECK (ref1 != ref2);
107 CHECK (ref2 == refX);
110 CHECK (isSameObject (p1, *ref1));
111 CHECK (isSameObject (p2, *ref2));
112 CHECK (isSameObject (p2, *refX));
114 cout << *ref1 << endl;
115 cout << *ref2 << endl;
116 cout << *refX << endl;
120 CHECK (2 == ref1.use_count());
121 CHECK (2 == ref2.use_count());
123 CHECK (exPla.time == twoSec);
124 CHECK (3 == ref2.use_count());
126 CHECK (index->contains(ref1));
127 CHECK (
sizeof(id2) ==
sizeof(ref2));
131 CHECK (ref1 != ref2);
132 CHECK (ref1 == refX);
133 CHECK (ref2 != refX);
137 CHECK (refX == ref2);
138 CHECK (isSameObject (*refX, p2));
140 CHECK (refX == ref1);
141 CHECK (refX != ref2);
142 CHECK (isSameObject (*refX, p1));
144 LumieraUid luid2 (p2.
getID().get());
148 CHECK (isSameObject (p1, *ref2));
149 CHECK (isSameObject (p2, *ref1));
153 CHECK (isSameObject (p1, *ref1));
154 CHECK (isSameObject (p1, *refX));
155 CHECK (isSameObject (p2, *ref2));
156 CHECK (ref1 != ref2);
157 CHECK (ref1 == refX);
158 CHECK (ref2 != refX);
161 CHECK (refX.resolve().time == lib::time::Time::MIN);
163 CHECK (refX.resolve().time == twoSec);
165 CHECK (p1.getID() != p2.
getID());
166 CHECK (2 == ref1.use_count());
167 CHECK (3 == ref2.use_count());
171 index->remove (ref1);
180 VERIFY_ERROR(BOTTOM_PLACEMENTREF, bottom->specialAPI() );
184 CHECK (1 == index->size());
185 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.
Simple 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, bypassing any custom comparison operators.