diff options
Diffstat (limited to 'src/components/policy/test/shared_library_test.cc')
-rw-r--r-- | src/components/policy/test/shared_library_test.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/components/policy/test/shared_library_test.cc b/src/components/policy/test/shared_library_test.cc index f8f77f1fda..f4177f0fd9 100644 --- a/src/components/policy/test/shared_library_test.cc +++ b/src/components/policy/test/shared_library_test.cc @@ -45,27 +45,28 @@ namespace policy { } } -TEST(SharedLibraryTest, FullTest_OpenLibrarySetSymbolCloseLibrary_ExpectActsWithoutErrors) { - //Arrange - const std::string kLib = "../src/policy/libPolicy.so"; +TEST(SharedLibraryTest, + FullTest_OpenLibrarySetSymbolCloseLibrary_ExpectActsWithoutErrors) { + // Arrange + const std::string kLib = "../libPolicy.so"; void* handle = dlopen(kLib.c_str(), RTLD_LAZY); - //Assert + // Assert EXPECT_FALSE(IsError(dlerror())); ASSERT_TRUE(handle); - //Act + // Act const std::string kSymbol = "CreateManager"; void* symbol = dlsym(handle, kSymbol.c_str()); - //Assert + // Assert EXPECT_FALSE(IsError(dlerror())); EXPECT_TRUE(symbol); - //Act + // Act int ret = dlclose(handle); - //Assert + // Assert EXPECT_FALSE(ret); EXPECT_FALSE(IsError(dlerror())); } |