MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / TEST

Function TEST

framework/test/gtest/StaticBundleTest.cpp:216–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214#endif
215
216 TEST(StaticBundleTest, testStaticBundle)
217 {
218 FrameworkFactory factory;
219 FrameworkConfiguration frameworkConfig;
220 auto framework = factory.NewFramework(frameworkConfig);
221 framework.Start();
222
223 auto context = framework.GetBundleContext();
224
225 { // scope the use of the listener so its destructor is
226 // called before we destroy the framework's bundle context.
227 // The TestBundleListener needs to remove its listeners while
228 // the framework is still active.
229 TestBundleListener listener;
230
231 BundleListenerRegistrationHelper<TestBundleListener> ml(context,
232 &listener,
233 &TestBundleListener::BundleChanged);
234 ServiceListenerRegistrationHelper<TestBundleListener> sl(context,
235 &listener,
236 &TestBundleListener::ServiceChanged);
237
238 frame020a(context, listener);
239 frame030b(context, listener);
240#ifdef US_BUILD_SHARED_LIBS
241 // bundles in the executable are auto-installed.
242 // install and uninstall on embedded bundles is not allowed.
243 frame040c(context, listener);
244#endif
245 }
246 }
247} // namespace
248
249US_MSVC_POP_WARNING

Callers

nothing calls this directly

Calls 6

frame020aFunction · 0.85
frame030bFunction · 0.85
frame040cFunction · 0.85
NewFrameworkMethod · 0.80
StartMethod · 0.45
GetBundleContextMethod · 0.45

Tested by

no test coverage detected