46 ::Local<vault::test::MediaAccessMock>;
59 virtual void run (Arg)
76 CHECK (isnil (a1->getParents()));
77 CHECK (isnil (a1->getDependant()));
79 PTestA a2 = TA::create(a1);
80 CHECK (a1 == a2->getParents()[0]);
81 CHECK (a2 == a1->getDependant()[0]);
85 CHECK (a3 == a2->getParents()[1]);
86 CHECK (a2 == a3->getDependant()[0]);
87 CHECK (!contains (a1->getDependant(), a3));
95 PTestA a1_ = TA::create();
97 PTestA a2_ = TA::create(a1);
99 PAsset a3 = TA::create(a2);
100 CHECK (a1 == a2->getParents()[0]);
101 CHECK (a2 == a1->getDependant()[0]);
102 CHECK (a2 == a3->getParents()[0]);
103 CHECK (a3 == a2->getDependant()[0]);
106 CHECK (isnil (a2->getDependant()));
107 CHECK (!contains (a1->getDependant(), a2));
108 CHECK (!isnil (a2->getParents()));
109 CHECK (contains (a3->getParents(), a2));
111 a2_->call_unlink(a1->getID());
113 PAsset a4 = TA::create(a1);
114 CHECK (a1 == a2->getParents()[0]);
115 CHECK (a1 == a4->getParents()[0]);
116 CHECK (a2 == a1->getDependant()[0]);
117 CHECK (a4 == a1->getDependant()[1]);
119 a1_->call_unlink(a4->getID());
120 CHECK (!contains (a1->getDependant(), a4));
121 CHECK ( contains (a1->getDependant(), a2));
122 CHECK (a1 == a4->getParents()[0]);
132 PTestA a2_= TA::create(a1);
136 CHECK (a1->isActive());
137 CHECK (a2->isActive());
138 CHECK (a3->isActive());
141 CHECK (!a1->isActive());
142 CHECK (!a2->isActive());
143 CHECK (a3->isActive());
146 CHECK (!a1->isActive());
147 CHECK (!a2->isActive());
150 CHECK (a1->isActive());
151 CHECK (a2->isActive());
154 CHECK (a1->isActive());
155 CHECK (!a2->isActive());
157 CHECK (a1->isActive());
158 CHECK (a2->isActive());
161 CHECK (a1->isActive());
162 CHECK (a2->isActive());
163 CHECK (!a3->isActive());
167 CHECK (!a1->isActive());
168 CHECK (!a2->isActive());
169 CHECK (a3->isActive());
174 CHECK (a1->isActive());
175 CHECK (!a2->isActive());
176 CHECK (!a3->isActive());
179 CHECK (a1->isActive());
180 CHECK (!a2->isActive());
181 CHECK (!a3->isActive());
183 CHECK (!a1->isActive());
185 CHECK (!a1->isActive());
186 CHECK (!a2->isActive());
187 CHECK (a3->isActive());
189 CHECK (a1->isActive());
190 CHECK (a2->isActive());
191 CHECK (a3->isActive());
203 MediaAccessMock useMockMedia;
209 PC cc = mm->createClip()->findClipAsset();
210 CHECK (dependencyCheck (cc,mm));
Per type specific configuration of instances created as service dependencies.
Steam-Layer implementation namespace root.
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...
void checkDependencyMechanics()
void checkEnablementPropagation()
A mock asset to support unit testing.
Definition of Asset representation for a media clip.
Test(mock) asset subclass usable for hijacking a given asset class (template parameter) and subsequen...
Small helper and diagnostic functions related to Asset and AssetManager.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
The asset subsystem of the Steam-Layer.
void checkRealAssetDependencyRegistration()
bool contains(SEQ const &cont, typename SEQ::const_reference val)
shortcut for brute-force containment test in any sequential container