info->ref_count = 10;
info->path = NULL;
info->interfaces = reinterpret_cast<GDBusInterfaceInfo**>(
- malloc(sizeof(GDBusInterfaceInfo)));
+ malloc(sizeof(GDBusInterfaceInfo*)));
info->nodes = NULL;
info->annotations = NULL;
EXPECT_CALL(GetMock<GioMock>(),
info->ref_count = 10;
info->path = NULL;
info->interfaces = reinterpret_cast<GDBusInterfaceInfo**>(
- malloc(sizeof(GDBusInterfaceInfo)));
+ malloc(sizeof(GDBusInterfaceInfo*)));
info->nodes = NULL;
info->annotations = NULL;
EXPECT_CALL(GetMock<GioMock>(),
info->ref_count = 10;
info->path = NULL;
info->interfaces = reinterpret_cast<GDBusInterfaceInfo**>(
- malloc(sizeof(GDBusInterfaceInfo)));
+ malloc(sizeof(GDBusInterfaceInfo*)));
info->nodes = NULL;
info->annotations = NULL;
EXPECT_CALL(GetMock<GioMock>(),
}
virtual void TearDown() {
- std::remove(kTestDb);
+ if (std::remove(kTestDb))
+ std::cerr << "Removing test db failed" << std::endl;
}
std::shared_ptr<ThemeInfoProxy> proxy_;
for (int i = 0; i < count; i++)
if (strarr[i])
free(strarr[i]);
-}
\ No newline at end of file
+ free(strarr);
+}
}
virtual void TearDown() {
- std::remove(kTestDb);
+ if (std::remove(kTestDb))
+ std::cerr << "Removing test db failed" << std::endl;
}
tizen_base::Bundle b_;
g_dbus_message_get_message_type(_)).
WillOnce(Return(G_DBUS_MESSAGE_TYPE_METHOD_RETURN));
tizen_base::Bundle b;
- std::vector<std::string> ids_vec;
+ std::vector<std::string> ids_vec = { "testid1", "testid2" };
b.Add(ttm::dbus::kCmdResultKey, "ok");
b.Add(ttm::dbus::kCmdDataKey, ids_vec);
auto br = b.ToRaw();
ret = theme_loader_query_id(loader_handle_, &ids, &count);
EXPECT_EQ(ret, THEME_MANAGER_ERROR_NONE);
- EXPECT_EQ(count, 0);
+ EXPECT_EQ(count, 2);
+ for (int i = 0; i < count; i++)
+ free(ids[i]);
+ free(ids);
}
TEST_F(ThemeLoaderTest, QueryID_N) {
TEST_F(ThemeLoaderTest, Destroy) {
theme_loader_h handle;
int ret = theme_loader_create(&handle);
- ASSERT_EQ(ret, THEME_MANAGER_ERROR_NONE);
+ EXPECT_EQ(ret, THEME_MANAGER_ERROR_NONE);
ASSERT_NE(handle, nullptr);
ret = theme_loader_destroy(handle);