39 using lib::test::showSizeof;
40 using namespace mobject::test;
41 using lumiera::error::LUMIERA_ERROR_ASSERTION;
44 ::Local<vault::test::MediaAccessMock>;
61 MediaAccessMock useMockMedia;
97 cout << showSizeof(pSub1) << endl;
98 cout << showSizeof(pSub2) << endl;
99 cout << showSizeof(pSub3) << endl;
100 cout << showSizeof(pSubM) << endl;
101 cout << showSizeof(pClip) << endl;
103 CHECK (
sizeof(pSub1) ==
sizeof(pSub3));
104 CHECK (
sizeof(pClip) ==
sizeof(pSub3));
106 cout << pSub1 << endl;
107 cout << pSub2 << endl;
108 cout << pSub3 << endl;
109 cout << pSubM << endl;
110 cout << pClip << endl;
114 CHECK (2 == pSubM.use_count());
115 CHECK (2 == pSub3.use_count());
117 CHECK (3 == pSubM.use_count());
118 CHECK (3 == pSub3.use_count());
119 CHECK (3 == pClip.use_count());
124 PSub21& hijacked =
reinterpret_cast<PSub21&
> (pClip);
126 hijacked->specialAPI();
127 CHECK (3 == hijacked.use_count());
128 CHECK (hijacked.getID() == pClip.getID());
130 cout << format_PlacementID(pSub1) << endl;
131 cout << format_PlacementID(pSub2) << endl;
132 cout << format_PlacementID(pSub3) << endl;
133 cout << format_PlacementID(pSubM) << endl;
134 cout << format_PlacementID(pClip) << endl;
137 CHECK (2 == pSubM.use_count());
138 CHECK (2 == pSub3.use_count());
140 CHECK (2 == pClip.use_count());
141 CHECK (2 == pSub1.use_count());
150 CHECK ( pSub2.isCompatible<
MObject>());
151 CHECK ( pSub2.isCompatible<
DummyMO>());
155 CHECK (!pSub2.isCompatible<
Clip>());
Subclass-1 is not defined "processible", thus will always be handled as DummyMO...
Test MObject subclass, which, contrary to any real MObject, can be created directly without involving...
Core abstraction: placement of a media object into session context.
#define INSTANCEOF(CLASS, EXPR)
shortcut for subclass test, intended for assertions only.
Per type specific configuration of instances created as service dependencies.
MObject in the Session to represent a clip on the timeline.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
A user visible/editable Clip is a reference to a contiguous sequence of media data loaded as Asset in...
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
MObject is the interface class for all "Media Objects".
This framework allows to (re)configure the lib::Depend front-end for dependency-injection.
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.
Lumiera error handling (C++ interface).
Subclass-2 is defined "processible", but we omit the necessary "applicable" definition in TestTool...