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

Function TEST

framework/test/gtest/FrameworkTest.cpp:87–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85} // namespace
86
87TEST(FrameworkTest, Ctor)
88{
89 ASSERT_FALSE(std::is_default_constructible<Framework>::value);
90 ASSERT_TRUE((std::is_constructible<Framework, Bundle>::value));
91
92 // Bundle b;
93 // ASSERT_THROW(Framework(Bundle(b)), std::logic_error); This causes a crash. TODO: Fix crash and uncomment this
94 // line.
95
96 auto f = FrameworkFactory().NewFramework();
97 ASSERT_TRUE(f);
98 f.Start();
99#if defined(US_BUILD_SHARED_LIBS)
100 auto bundle = cppmicroservices::testing::InstallLib(f.GetBundleContext(), "TestBundleA");
101#else
102 auto bundle = cppmicroservices::testing::GetBundle("TestBundleA", f.GetBundleContext());
103#endif
104 ASSERT_THROW(auto f1 = Framework(Bundle(bundle)), std::logic_error);
105}
106
107TEST(FrameworkTest, MoveCtor)
108{

Callers

nothing calls this directly

Calls 15

InstallLibFunction · 0.85
GetBundleFunction · 0.85
GetTempDirectoryFunction · 0.85
MakeUniqueTempDirectoryFunction · 0.85
ExistsFunction · 0.85
NewFrameworkMethod · 0.80
GetSymbolicNameMethod · 0.80
GetVersionMethod · 0.80
GetThrowableMethod · 0.80
CheckListenerEventsMethod · 0.80
ToStringNoExceptMethod · 0.80

Tested by

no test coverage detected