| 85 | } // namespace |
| 86 | |
| 87 | TEST(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 | |
| 107 | TEST(FrameworkTest, MoveCtor) |
| 108 | { |
nothing calls this directly
no test coverage detected