48 using lib::test::showSizeof;
49 using namespace mobject::test;
50 using lumiera::error::LUMIERA_ERROR_ASSERTION;
53 ::Local<vault::test::MediaAccessMock>;
70 MediaAccessMock useMockMedia;
106 cout << showSizeof(pSub1) << endl;
107 cout << showSizeof(pSub2) << endl;
108 cout << showSizeof(pSub3) << endl;
109 cout << showSizeof(pSubM) << endl;
110 cout << showSizeof(pClip) << endl;
112 CHECK (
sizeof(pSub1) ==
sizeof(pSub3));
113 CHECK (
sizeof(pClip) ==
sizeof(pSub3));
115 cout << pSub1 << endl;
116 cout << pSub2 << endl;
117 cout << pSub3 << endl;
118 cout << pSubM << endl;
119 cout << pClip << endl;
123 CHECK (2 == pSubM.use_count());
124 CHECK (2 == pSub3.use_count());
126 CHECK (3 == pSubM.use_count());
127 CHECK (3 == pSub3.use_count());
128 CHECK (3 == pClip.use_count());
133 PSub21& hijacked =
reinterpret_cast<PSub21&
> (pClip);
135 hijacked->specialAPI();
136 CHECK (3 == hijacked.use_count());
137 CHECK (hijacked.getID() == pClip.getID());
139 cout << format_PlacementID(pSub1) << endl;
140 cout << format_PlacementID(pSub2) << endl;
141 cout << format_PlacementID(pSub3) << endl;
142 cout << format_PlacementID(pSubM) << endl;
143 cout << format_PlacementID(pClip) << endl;
146 CHECK (2 == pSubM.use_count());
147 CHECK (2 == pSub3.use_count());
149 CHECK (2 == pClip.use_count());
150 CHECK (2 == pSub1.use_count());
159 CHECK ( pSub2.isCompatible<
MObject>());
160 CHECK ( pSub2.isCompatible<
DummyMO>());
164 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.
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.
Lumiera error handling (C++ interface).
Subclass-2 is defined "processible", but we omit the necessary "applicable" definition in TestTool...