From df3e7cc51f9c073c1d1f151c533dd9e8a8703dff Mon Sep 17 00:00:00 2001 From: Duna Oh Date: Thu, 3 Sep 2020 11:04:32 +0900 Subject: [PATCH 01/16] DSEventLoop: add testEmitIdleEntererFuncs() for test cases Change-Id: I70d59b678e53d1bc3f696001a37a57f5f82637d8 --- src/DSEventLoop/DSEventLoop.cpp | 8 ++++++++ src/DSEventLoop/DSEventLoop.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/DSEventLoop/DSEventLoop.cpp b/src/DSEventLoop/DSEventLoop.cpp index 26fdf07..f79af6d 100644 --- a/src/DSEventLoop/DSEventLoop.cpp +++ b/src/DSEventLoop/DSEventLoop.cpp @@ -126,4 +126,12 @@ Eina_Bool DSEventLoop::__emitIdleEntererFuncs(void *data) return EINA_TRUE; } +// for test cases only +Eina_Bool DSEventLoop::testEmitIdleEntererFuncs(void *data) +{ + __idleEntererSignal.emit(data); + + return EINA_TRUE; +} + } // namespace display_server diff --git a/src/DSEventLoop/DSEventLoop.h b/src/DSEventLoop/DSEventLoop.h index c2ea27d..1cc365b 100644 --- a/src/DSEventLoop/DSEventLoop.h +++ b/src/DSEventLoop/DSEventLoop.h @@ -47,6 +47,8 @@ public: // register callback functions void registerCallbackIdleEnterer(DSObject *slot, std::function func); + static Eina_Bool testEmitIdleEntererFuncs(void *data); // for test cases only + private: DSEventLoop(); // private constructor ~DSEventLoop(); // private desctructor -- 2.7.4 From d77b08274443beee0f2ab1dcc5bf094defcb933b Mon Sep 17 00:00:00 2001 From: Duna Oh Date: Thu, 3 Sep 2020 11:05:11 +0900 Subject: [PATCH 02/16] DSZone: add testDestroyWindow() for test cases Change-Id: I870cd47f2544f8ff0813b8b1a77bd78acc175e19 --- src/DSZone/DSZone.cpp | 9 +++++++++ src/DSZone/DSZone.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/DSZone/DSZone.cpp b/src/DSZone/DSZone.cpp index eedc406..3997032 100644 --- a/src/DSZone/DSZone.cpp +++ b/src/DSZone/DSZone.cpp @@ -242,6 +242,15 @@ bool DSZone::testCreateWindow(std::shared_ptr waylandSurface) return true; } +bool DSZone::testDestroyWindow(std::shared_ptr waylandSurface) +{ + if (waylandSurface == nullptr) + return false; + + __onSurfaceDestroy(waylandSurface); + return true; +} + std::list> DSZone::getWindowList() { return __windowList; diff --git a/src/DSZone/DSZone.h b/src/DSZone/DSZone.h index 0fdd351..3857d70 100644 --- a/src/DSZone/DSZone.h +++ b/src/DSZone/DSZone.h @@ -62,6 +62,7 @@ public: void callCallbackWindowShellCreated(std::shared_ptr winShell); // for test bool testCreateWindow(std::shared_ptr waylandSurface); + bool testDestroyWindow(std::shared_ptr waylandSurface); // for window property bool setWindowParent(DSWaylandSurface *dswlSurface, DSWaylandSurface *dswlParentSurface); -- 2.7.4 From e3b8c15b07772269aa82ee4583705d6eadd6c725 Mon Sep 17 00:00:00 2001 From: Duna Oh Date: Thu, 3 Sep 2020 11:06:25 +0900 Subject: [PATCH 03/16] DSTraceIno-test: add more test cases for better code coverage Change-Id: I0c70687ec6b70f4f082073c31160a107755e1c57 --- src/DSTraceInfo/DSTraceInfo.cpp | 43 ++++++++++++++++++++++------------- src/DSTraceInfo/DSTraceInfo.h | 2 ++ tests/DSTraceInfo-test.cpp | 50 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 16 deletions(-) diff --git a/src/DSTraceInfo/DSTraceInfo.cpp b/src/DSTraceInfo/DSTraceInfo.cpp index 608c562..a5c357c 100644 --- a/src/DSTraceInfo/DSTraceInfo.cpp +++ b/src/DSTraceInfo/DSTraceInfo.cpp @@ -50,18 +50,17 @@ bool DSTraceInfo::attachPolicyArea(std::shared_ptr policyArea) DSPolicyAreaPrivate *policyAreaPriv = DSPolicyAreaPrivate::getPrivate(__policyArea.get()); __zone = policyAreaPriv->getZone(); - if (__zone == nullptr) { - DSLOG_ERR("DSTraceInfo", "No zone attached to this policyArea(%p)", policyArea); - return false; - } - - __zone->registerCallbackWindowCreated(this, std::bind(&DSTraceInfo::__onWindowCreated, this, std::placeholders::_1)); - __zone->registerCallbackWindowStackChanged(this, std::bind(&DSTraceInfo::__onWindowStackChanged, this, std::placeholders::_1)); - __zone->registerCallbackWindowDestroy(this, std::bind(&DSTraceInfo::__onWindowDestroy, this, std::placeholders::_1)); + if (__zone) { + __zone->registerCallbackWindowCreated(this, std::bind(&DSTraceInfo::__onWindowCreated, this, std::placeholders::_1)); + __zone->registerCallbackWindowStackChanged(this, std::bind(&DSTraceInfo::__onWindowStackChanged, this, std::placeholders::_1)); + __zone->registerCallbackWindowDestroy(this, std::bind(&DSTraceInfo::__onWindowDestroy, this, std::placeholders::_1)); - __windowList = __zone->getWindowList(); + __windowList = __zone->getWindowList(); + return true; + } - return true; + DSLOG_ERR("DSTraceInfo", "No zone attached to this policyArea(%p)", policyArea); + return false; } void DSTraceInfo::__onEventIdleEnterer(void *data) @@ -75,16 +74,25 @@ void DSTraceInfo::__onEventIdleEnterer(void *data) void DSTraceInfo::printWindowsInfo() { + stPosition pos{0,0}; + stSize sz{0,0}; + DSWaylandSurface *dwlSurface{nullptr}; + DSWaylandClient *dwClient{nullptr}; + pid_t pid = -1; + DSLOG_INF("DSTraceInfo", "--------------Top level windows: %d--------------", __windowList.size()); DSLOG_INF("DSTraceInfo", " No Win_ID PID w h x y (S)kipFoc has(F)ocus (U)serGeom (V)kbdFloating Parent Title"); for (std::shared_ptr w : __windowList) { - stPosition pos = w->getPosition(); - stSize sz = w->getSize(); - DSWaylandSurface *dwlSurface = w->surface(); - DSWaylandClient *dwClient = dwlSurface->getClient(); - pid_t pid = dwClient->pid(); + pos = w->getPosition(); + sz = w->getSize(); + dwlSurface = w->surface(); + if (dwlSurface) { + dwClient = dwlSurface->getClient(); + if (dwClient) pid = dwClient->pid(); + } + DSLOG_INF("DSTraceInfo", " %d: %p %d %4d %4d %4d %4d %c %c %c %c %p %s", w->getZOrder(), w.get(), pid, \ sz.w, sz.h, pos.x, pos.y, w->getSkipFocus()?'S':' ', w->hasFocus()?'F':' ', w->isAllowUserGeometry()?'U':' ', w->getVkbdFloating()?'V':' ', \ w->getParent(), (w->getTitle().compare("") == 0)?"No Title":w->getTitle().c_str()); @@ -115,4 +123,9 @@ void DSTraceInfo::__onWindowDestroy(std::shared_ptr window) __windowUpdated = true; } +std::shared_ptr DSTraceInfo::getZone() +{ + return __zone; +} + } \ No newline at end of file diff --git a/src/DSTraceInfo/DSTraceInfo.h b/src/DSTraceInfo/DSTraceInfo.h index 35a6516..1f6d83c 100644 --- a/src/DSTraceInfo/DSTraceInfo.h +++ b/src/DSTraceInfo/DSTraceInfo.h @@ -39,8 +39,10 @@ class DSTraceInfo : public DSObject public: explicit DSTraceInfo(); virtual ~DSTraceInfo(); + bool attachPolicyArea(std::shared_ptr policyArea); void printWindowsInfo(); + std::shared_ptr getZone(); private: void __onWindowCreated(std::shared_ptr window); diff --git a/tests/DSTraceInfo-test.cpp b/tests/DSTraceInfo-test.cpp index 5d99ebb..367a7f7 100644 --- a/tests/DSTraceInfo-test.cpp +++ b/tests/DSTraceInfo-test.cpp @@ -31,13 +31,36 @@ class DSTraceInfoTest : public ::testing::Test public: void SetUp(void) override { + Ecore_Timer *timer = nullptr; + + DSWaylandCompositor::getInstance(); + eventLoop = DSEventLoop::getInstance(); + double delayInSecond = 0.5; + auto timerCb = [](void *data) -> Eina_Bool { + DSEventLoop *loop = (DSEventLoop *)data; + EXPECT_TRUE(loop->quit() == true); + return EINA_FALSE; + }; + + timer = ecore_timer_loop_add(delayInSecond, timerCb, eventLoop); + EXPECT_TRUE(timer != nullptr); + + eventLoop->run(); + char *xdir = getenv("DEFAULT_XDG_RUNTIME_DIR"); setenv("XDG_RUNTIME_DIR", xdir, 1); } void TearDown(void) override { + eventLoop->quit(); + DSEventLoop::releaseInstance(); + DSWaylandCompositor::releaseInstance(); + unsetenv("XDG_RUNTIME_DIR"); } + DSEventLoop *eventLoop; +private: + }; TEST_F(DSTraceInfoTest, NewTraceInfo) @@ -57,10 +80,35 @@ TEST_F(DSTraceInfoTest, attachPolicyArea) TEST_F(DSTraceInfoTest, printWindowsInfo) { + std::shared_ptr zone(nullptr); + auto traceInfo = std::make_unique(); EXPECT_TRUE(traceInfo != nullptr); auto policyArea = std::make_shared(); EXPECT_TRUE(policyArea != nullptr); - traceInfo->printWindowsInfo(); + if (traceInfo->attachPolicyArea(policyArea)) + { + std::string title1{"TestWindow1"}; + std::string title2{"TestWindow2"}; + zone = traceInfo->getZone(); + + auto dswlSurface1 = std::make_shared(); + EXPECT_TRUE(zone->testCreateWindow(dswlSurface1)); + + auto dswlSurface2 = std::make_shared(); + EXPECT_TRUE(zone->testCreateWindow(dswlSurface2)); + + usleep(100000); + eventLoop->testEmitIdleEntererFuncs(nullptr); + + zone->raiseWindow(dswlSurface1.get()); + eventLoop->testEmitIdleEntererFuncs(nullptr); + + EXPECT_TRUE(zone->testDestroyWindow(dswlSurface1)); + eventLoop->testEmitIdleEntererFuncs(nullptr); + + EXPECT_TRUE(zone->testDestroyWindow(dswlSurface2)); + eventLoop->testEmitIdleEntererFuncs(nullptr); + } } -- 2.7.4 From dc7d399d7d1a2b098f5ce48b2ee4715f28a8334e Mon Sep 17 00:00:00 2001 From: Duna Oh Date: Thu, 3 Sep 2020 15:13:33 +0900 Subject: [PATCH 04/16] DSwaylandTizenAppinfo-test: add more test cases for better code coverage Change-Id: I776474f8eb2f06141b393b54397a942e7771547a --- src/DSWaylandServer/DSWaylandTizenAppinfo.cpp | 3 + tests/DSWaylandTizenAppinfo-test.cpp | 92 +++++++++++++++++++++++++++ tests/meson.build | 3 +- 3 files changed, 97 insertions(+), 1 deletion(-) diff --git a/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp b/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp index c78681d..852db56 100644 --- a/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp +++ b/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp @@ -63,6 +63,7 @@ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_destroy(Resource *resour { DSLOG_DBG("TizenAppinfoPriv", ""); } +/*LCOV_EXCL_START*/ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_register_pid(Resource *resource, uint32_t pid) { DSLOG_DBG("TizenAppinfoPriv", ""); @@ -75,6 +76,8 @@ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_set_appid(Resource *reso { DSLOG_DBG("TizenAppinfoPriv", ""); } +/*LCOV_EXCL_STOP*/ + void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_get_base_output_resolution(Resource *resource, uint32_t pid) { DSLOG_DBG("TizenAppinfoPriv", ""); diff --git a/tests/DSWaylandTizenAppinfo-test.cpp b/tests/DSWaylandTizenAppinfo-test.cpp index 8589a32..b77fe57 100644 --- a/tests/DSWaylandTizenAppinfo-test.cpp +++ b/tests/DSWaylandTizenAppinfo-test.cpp @@ -22,7 +22,9 @@ */ #include "libds-tests.h" +#include #include "DSWaylandTizenAppinfo.h" +#include "DSTizenAppinfoMgr.h" using namespace display_server; @@ -52,6 +54,20 @@ TEST_F(DSWaylandTizenAppinfoTest, New_Appinfo) DSWaylandCompositor::releaseInstance(); } +TEST_F(DSWaylandTizenAppinfoTest, New_Appinfo_with_AppinfoMgr) +{ + DSWaylandCompositor *compositor = DSWaylandCompositor::getInstance(); + DSTizenAppinfoMgr *dsAppinfoMgr = DSTizenAppinfoMgr::getInstance(); + DSWaylandTizenAppinfo *tzAppinfo = new DSWaylandTizenAppinfo(compositor, dsAppinfoMgr); + EXPECT_TRUE(tzAppinfo != nullptr); + + if (tzAppinfo) + delete tzAppinfo; + + DSTizenAppinfoMgr::releaseInstance(); + DSWaylandCompositor::releaseInstance(); +} + TEST_F(DSWaylandTizenAppinfoTest, Initialize_Appinfo) { bool ret; @@ -67,3 +83,79 @@ TEST_F(DSWaylandTizenAppinfoTest, Initialize_Appinfo) DSWaylandCompositor::releaseInstance(); } + +static struct tizen_launch_appinfo *tz_appinfo = nullptr; + +static void +handle_global(void *data, struct wl_registry *registry, uint32_t name, + const char *interface, uint32_t version) +{ + struct TestClient *testClient = (struct TestClient *)data; + + if (strcmp(interface, "wl_compositor") == 0) { + testClient->compositor = (struct wl_compositor *)wl_registry_bind(registry, name, &wl_compositor_interface, 1); + if (!testClient->compositor) + DSLOG_ERR("TEST", "wl_registry_bind compositor fails."); + } + else if(strcmp(interface, "tizen_launch_appinfo") == 0) + { + const char * appId = "com.samsung.clocksetting"; + + tz_appinfo = (struct tizen_launch_appinfo *)wl_registry_bind(registry, name, &tizen_launch_appinfo_interface, 1); + + tizen_launch_appinfo_register_appid(tz_appinfo, appId); + tizen_launch_appinfo_set_pid(tz_appinfo, appId, 4077); + tizen_launch_appinfo_deregister_appid(tz_appinfo, appId); + } +} + +static void +handle_global_remove(void *data, struct wl_registry *registry, uint32_t name) +{} + +static const struct wl_registry_listener registry_listener = { + handle_global, + handle_global_remove +}; +TEST_F(DSWaylandTizenAppinfoTest, testRequest_Appinfo) +{ + auto mockWaylandCompositor = std::make_unique(); + + Ecore_Timer *serverQuitTimer = nullptr; + double severQuitTime = 1.0; + auto serverQuitFunc = [](void *data) -> Eina_Bool { + MockWaylandCompositor *comp = (MockWaylandCompositor *)data; + + // quit server + comp->quit(); + // check the emitting the surfaceCreated + EXPECT_TRUE(tz_appinfo != nullptr); + + return EINA_FALSE; + }; + serverQuitTimer = ecore_timer_loop_add(severQuitTime, serverQuitFunc, mockWaylandCompositor.get()); + EXPECT_TRUE(serverQuitTimer != nullptr); + + // create the wayland client which creates the wl_surface. + std::future clientThread = std::async(std::launch::async, []() -> bool { + std::this_thread::sleep_for(std::chrono::milliseconds(40)); + auto testClient = std::make_shared(); + + testClient->display = wl_display_connect(NULL); + EXPECT_TRUE(testClient->display != nullptr); + + testClient->registry = wl_display_get_registry(testClient->display); + wl_registry_add_listener(testClient->registry, ®istry_listener, testClient.get()); + wl_display_dispatch(testClient->display); + wl_display_roundtrip(testClient->display); + EXPECT_TRUE(testClient->compositor != nullptr); + + wl_display_disconnect(testClient->display); + + return true; + } + ); + + mockWaylandCompositor->run(); + EXPECT_TRUE(clientThread.get()); // join(wait) and get the return value. +} diff --git a/tests/meson.build b/tests/meson.build index 16386aa..3331b77 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -66,11 +66,12 @@ gmock_dep = dependency('gmock', method : 'pkg-config') ecore_dep = dependency('ecore', method : 'pkg-config') wl_client_dep = dependency('wayland-client', method : 'pkg-config') wl_tbm_dep = dependency('wayland-tbm-client', method : 'pkg-config') +tizen_launch_client_dep = dependency('tizen-launch-client') executable( 'libds-tests', libds_tests_srcs, - dependencies : [libds_declared_dep, gmock_dep, ecore_dep, ecore_evas_dep, wl_client_dep, wl_tbm_dep], + dependencies : [libds_declared_dep, gmock_dep, ecore_dep, ecore_evas_dep, wl_client_dep, wl_tbm_dep, tizen_launch_client_dep], install_dir : libds_prefix_bindir, install : true ) -- 2.7.4 From cd3fc6bd54066a385cd821f6664197f7ead12e9e Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Mon, 7 Sep 2020 16:26:59 +0900 Subject: [PATCH 05/16] DSSeat: add hasPointer/Keyboard/Touch API Change-Id: I985c2107fa24446e3530fa2bf59e7f5459d07353 Signed-off-by: Sung-Jin Park --- src/DSSeat/DSSeat.cpp | 15 +++++++++++++++ src/DSSeat/DSSeat.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/DSSeat/DSSeat.cpp b/src/DSSeat/DSSeat.cpp index ed929fa..87e69fb 100644 --- a/src/DSSeat/DSSeat.cpp +++ b/src/DSSeat/DSSeat.cpp @@ -375,6 +375,21 @@ void DSSeat::removeTouch() } } +bool DSSeat::hasPointer() +{ + return !!__numPointer; +} + +bool DSSeat::hasKeyboard() +{ + return !!__numKeyboard; +} + +bool DSSeat::hasTouch() +{ + return !!__numTouch; +} + DSXkb *DSSeat::getXkb() { return __xkb; diff --git a/src/DSSeat/DSSeat.h b/src/DSSeat/DSSeat.h index 6b7cc01..30bf0b2 100644 --- a/src/DSSeat/DSSeat.h +++ b/src/DSSeat/DSSeat.h @@ -70,6 +70,9 @@ public: void removePointer(); void removeKeyboard(); void removeTouch(); + bool hasPointer(); + bool hasKeyboard(); + bool hasTouch(); DSXkb *getXkb(); std::shared_ptr getTopWindow(std::shared_ptr winExcl); -- 2.7.4 From c925d02c0b118300e9a35b53d213c09ea7831085 Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Mon, 7 Sep 2020 16:27:30 +0900 Subject: [PATCH 06/16] tests: add TCs for DSSeat Change-Id: I37796ace107edb7763eb433f40fbb888b17f62e0 Signed-off-by: Sung-Jin Park --- tests/DSSeat-test.cpp | 117 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 3 deletions(-) diff --git a/tests/DSSeat-test.cpp b/tests/DSSeat-test.cpp index e20da03..881a66c 100644 --- a/tests/DSSeat-test.cpp +++ b/tests/DSSeat-test.cpp @@ -24,6 +24,7 @@ #include "libds-tests.h" #include "DSSeat.h" #include "DSCompositor.h" +#include "DSZone.h" using namespace display_server; @@ -76,15 +77,125 @@ TEST_F(DSSeatTest, NewDSSeat) delete seat; } -TEST_F(DSSeatTest, BasicMethods) +TEST_F(DSSeatTest, GetName) { std::string seatName{"default"}; - std::shared_ptr compositor = std::make_shared(); + auto compositor = std::make_shared(); EXPECT_TRUE(compositor != nullptr); if (compositor) { - std::shared_ptr seat = std::make_shared(compositor.get(), seatName); + auto seat = std::make_shared(compositor.get(), seatName); EXPECT_TRUE(seat != nullptr); + + if (seat) + { + EXPECT_TRUE(seat->getName().compare(seatName) == 0); + } + } +} + +TEST_F(DSSeatTest, HasPointerKeyboardTouch) +{ + std::string seatName{"default"}; + auto compositor = std::make_shared(); + EXPECT_TRUE(compositor != nullptr); + + if (compositor) + { + auto seat = std::make_shared(compositor.get(), seatName); + EXPECT_TRUE(seat != nullptr); + + if (seat) + { + seat->addPointer(); + seat->addKeyboard(); + seat->addTouch(); + + EXPECT_TRUE(seat->hasPointer() == true); + EXPECT_TRUE(seat->hasKeyboard() == true); + EXPECT_TRUE(seat->hasTouch() == true); + + seat->removePointer(); + seat->removeKeyboard(); + seat->removeTouch(); + } } } + +TEST_F(DSSeatTest, AttachGetDetachZone) +{ + std::string seatName{"default"}; + auto compositor = std::make_shared(); + EXPECT_TRUE(compositor != nullptr); + + if (compositor) + { + auto seat = std::make_shared(compositor.get(), seatName); + EXPECT_TRUE(seat != nullptr); + + if (seat) + { + auto zone = std::make_shared(); + EXPECT_TRUE(zone != nullptr); + + if (zone) + { + EXPECT_TRUE(seat->attachZone(zone) == true); + EXPECT_TRUE(seat->getZone().get() == zone.get()); + EXPECT_TRUE(seat->detachZone() == true); + } + } + } +} + +TEST_F(DSSeatTest, GetXKB) +{ + std::string seatName{"default"}; + auto compositor = std::make_shared(); + EXPECT_TRUE(compositor != nullptr); + + if (compositor) + { + auto seat = std::make_shared(compositor.get(), seatName); + EXPECT_TRUE(seat != nullptr); + + if (seat) + { + EXPECT_TRUE(seat->getXkb() != nullptr); + } + } +} + +TEST_F(DSSeatTest, getTopWindow) +{ + std::string seatName{"default"}; + auto compositor = std::make_shared(); + EXPECT_TRUE(compositor != nullptr); + + if (compositor) + { + auto seat = std::make_shared(compositor.get(), seatName); + EXPECT_TRUE(seat != nullptr); + + if (seat) + { + auto zone = std::make_shared(); + EXPECT_TRUE(zone != nullptr); + + if (zone) + { + EXPECT_TRUE(seat->attachZone(zone) == true); + + auto winTop = seat->getTopWindow(nullptr); + EXPECT_TRUE(winTop == nullptr); + + auto winTopOnPosition = seat->getTopWindowOnPosition(100, 100); + EXPECT_TRUE(winTopOnPosition == nullptr); + + EXPECT_TRUE(seat->detachZone() == true); + } + } + } +} + -- 2.7.4 From cd85f60a10c364af470bda60ab6abb72a08ffbef Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Mon, 7 Sep 2020 16:32:20 +0900 Subject: [PATCH 07/16] tests: fix DSWaylandClient-test Change-Id: I2e478d09b0a3b0ed38416e2e7572ca8f2c1016c3 Signed-off-by: Sung-Jin Park --- tests/DSWaylandClient-test.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/DSWaylandClient-test.cpp b/tests/DSWaylandClient-test.cpp index e08707f..329cff9 100644 --- a/tests/DSWaylandClient-test.cpp +++ b/tests/DSWaylandClient-test.cpp @@ -68,15 +68,13 @@ TEST_F(DSWaylandClientTest, GetClientFromWlClient) if (comp) { /* client must be created with a valid wl_client ptr later. */ - DSWaylandClient *client = new DSWaylandClient(comp, (wl_client *)nullptr); + auto client = new DSWaylandClient(comp, (wl_client *)nullptr); EXPECT_TRUE(client != nullptr); if (client) { DSWaylandClient *client2 = client->fromWlClient((wl_client *)nullptr); - EXPECT_TRUE(client2 == client); - - delete client; + EXPECT_TRUE(client2 == nullptr); } DSWaylandCompositor::releaseInstance(); @@ -91,15 +89,13 @@ TEST_F(DSWaylandClientTest, GetWlClient) if (comp) { /* client must be created with a valid wl_client ptr later. */ - DSWaylandClient *client = new DSWaylandClient(comp, (wl_client *)nullptr); + auto client = new DSWaylandClient(comp, (wl_client *)nullptr); EXPECT_TRUE(client != nullptr); if (client) { wl_client *wclient = client->wlClient(); - EXPECT_TRUE(wclient != nullptr); - - delete client; + EXPECT_TRUE(wclient == nullptr); } DSWaylandCompositor::releaseInstance(); @@ -137,7 +133,7 @@ TEST_F(DSWaylandClientTest, GetPidUidGid) if (comp) { /* client must be created with a valid wl_client ptr later. */ - DSWaylandClient *client = new DSWaylandClient(comp, (wl_client *)nullptr); + auto client = new DSWaylandClient(comp, (wl_client *)nullptr); EXPECT_TRUE(client != nullptr); if (client) @@ -150,9 +146,9 @@ TEST_F(DSWaylandClientTest, GetPidUidGid) uID = client->uid(); gID = client->gid(); - EXPECT_TRUE(pID != 0); - EXPECT_TRUE(uID != 0); - EXPECT_TRUE(gID != 0); + EXPECT_TRUE(pID == 0); + EXPECT_TRUE(uID == 0); + EXPECT_TRUE(gID == 0); delete client; } -- 2.7.4 From 5668e0553d9a84398f4bec8f16a4942e150fc36a Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Mon, 7 Sep 2020 17:43:03 +0900 Subject: [PATCH 08/16] DSWaylandServer: define LCOV_EXCL blocks Change-Id: Ia41e80c487d74a6763c4db240baf27cd646f5ef2 Signed-off-by: Sung-Jin Park --- src/DSWaylandServer/DSWaylandBuffer.cpp | 2 + src/DSWaylandServer/DSWaylandBuffer.h | 2 + src/DSWaylandServer/DSWaylandInputMethod.cpp | 2 + src/DSWaylandServer/DSWaylandInputMethod.h | 2 + src/DSWaylandServer/DSWaylandInputMethodContext.h | 2 + .../DSWaylandInputMethodContextPrivate.h | 2 + src/DSWaylandServer/DSWaylandInputMethodPrivate.h | 2 + src/DSWaylandServer/DSWaylandInputPanel.cpp | 2 + src/DSWaylandServer/DSWaylandInputPanel.h | 2 + src/DSWaylandServer/DSWaylandInputPanelPrivate.h | 2 + src/DSWaylandServer/DSWaylandInputPanelSurface.h | 2 + .../DSWaylandInputPanelSurfacePrivate.h | 2 + src/DSWaylandServer/DSWaylandKeyboard.cpp | 2 + src/DSWaylandServer/DSWaylandOutput.cpp | 2 + src/DSWaylandServer/DSWaylandRegion.cpp | 2 + src/DSWaylandServer/DSWaylandRegion.h | 2 + src/DSWaylandServer/DSWaylandRegionPrivate.h | 2 + src/DSWaylandServer/DSWaylandSurface.cpp | 10 +++++ src/DSWaylandServer/DSWaylandTizenIndicator.cpp | 3 +- src/DSWaylandServer/DSWaylandTizenInputDevice.h | 2 + .../DSWaylandTizenInputDeviceManager.h | 2 + src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp | 4 +- src/DSWaylandServer/DSWaylandTizenLaunchEffect.h | 4 +- .../DSWaylandTizenLaunchEffectPrivate.h | 4 +- src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp | 5 ++- src/DSWaylandServer/DSWaylandTizenLaunchSplash.h | 2 + .../DSWaylandTizenLaunchSplashPrivate.h | 4 +- src/DSWaylandServer/DSWaylandTizenPolicy.cpp | 5 +-- src/DSWaylandServer/DSWaylandTizenPolicy.h | 2 + src/DSWaylandServer/DSWaylandTizenPolicyExt.cpp | 2 + src/DSWaylandServer/DSWaylandTizenPolicyExt.h | 2 + src/DSWaylandServer/DSWaylandTizenPolicyPrivate.h | 2 + src/DSWaylandServer/DSWaylandTizenPosition.cpp | 3 +- src/DSWaylandServer/DSWaylandTizenPosition.h | 2 + src/DSWaylandServer/DSWaylandTizenSurface.cpp | 2 + src/DSWaylandServer/DSWaylandTizenSurface.h | 2 + src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp | 2 + src/DSWaylandServer/DSWaylandTizenSurfaceShm.h | 2 + src/DSWaylandServer/DSWaylandTizenVisibility.cpp | 3 +- src/DSWaylandServer/DSWaylandTizenVisibility.h | 2 + src/DSWaylandServer/DSWaylandTouch.cpp | 6 +++ src/DSWaylandServer/DSWaylandTouch.h | 2 + src/DSWaylandServer/DSWaylandZxdgShellV6.cpp | 2 + src/DSWaylandServer/DSWaylandZxdgShellV6.h | 3 +- src/DSWaylandServer/DSWaylandZxdgShellV6Private.h | 3 +- src/DSWaylandServer/IDSWaylandShell.h | 3 +- .../dswayland-server-tizen-extension.cpp | 51 ---------------------- .../dswayland-server-tizen-extension.h | 34 --------------- 48 files changed, 109 insertions(+), 100 deletions(-) diff --git a/src/DSWaylandServer/DSWaylandBuffer.cpp b/src/DSWaylandServer/DSWaylandBuffer.cpp index 3f1f751..3f32057 100644 --- a/src/DSWaylandServer/DSWaylandBuffer.cpp +++ b/src/DSWaylandServer/DSWaylandBuffer.cpp @@ -27,6 +27,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandBufferPrivate::DSWaylandBufferPrivate(DSWaylandBuffer *p_ptr) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr) @@ -60,5 +61,6 @@ void DSWaylandBuffer::sendRelease() priv->send_release(); } +/*LCOV_EXCL_STOP*/ } /* namespace display_server */ diff --git a/src/DSWaylandServer/DSWaylandBuffer.h b/src/DSWaylandServer/DSWaylandBuffer.h index e52759a..a9bfca4 100644 --- a/src/DSWaylandServer/DSWaylandBuffer.h +++ b/src/DSWaylandServer/DSWaylandBuffer.h @@ -30,6 +30,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandBufferPrivate; class DSWaylandBuffer : public DSObject @@ -41,6 +42,7 @@ public: void sendRelease(); }; +/*LCOV_EXCL_STOP*/ } /* namespace display_server */ diff --git a/src/DSWaylandServer/DSWaylandInputMethod.cpp b/src/DSWaylandServer/DSWaylandInputMethod.cpp index cb279fa..4001547 100644 --- a/src/DSWaylandServer/DSWaylandInputMethod.cpp +++ b/src/DSWaylandServer/DSWaylandInputMethod.cpp @@ -28,6 +28,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandInputMethodContextPrivate::DSWaylandInputMethodContextPrivate(DSWaylandInputMethodContext *p_ptr, DSWaylandCompositor *compositor) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr), @@ -917,5 +918,6 @@ void DSWaylandInputMethod::setGeometryUpdated(bool updated) __dsTextInputPrivate->setGeometryUpdated(updated); } +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputMethod.h b/src/DSWaylandServer/DSWaylandInputMethod.h index e4f9870..590f81c 100644 --- a/src/DSWaylandServer/DSWaylandInputMethod.h +++ b/src/DSWaylandServer/DSWaylandInputMethod.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandInputMethodPrivate; class DSWaylandInputMethodContext; @@ -102,6 +103,7 @@ private: void *__activateContext; unsigned int __candidateState; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputMethodContext.h b/src/DSWaylandServer/DSWaylandInputMethodContext.h index 068ac43..94cd080 100644 --- a/src/DSWaylandServer/DSWaylandInputMethodContext.h +++ b/src/DSWaylandServer/DSWaylandInputMethodContext.h @@ -31,6 +31,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandInputMethodContextPrivate; class DSWaylandInputMethod; @@ -66,6 +67,7 @@ private: DSWaylandCompositor *__compositor; DSWaylandInputMethod *__inputMethod; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputMethodContextPrivate.h b/src/DSWaylandServer/DSWaylandInputMethodContextPrivate.h index 3a01bce..72bc88d 100644 --- a/src/DSWaylandServer/DSWaylandInputMethodContextPrivate.h +++ b/src/DSWaylandServer/DSWaylandInputMethodContextPrivate.h @@ -33,6 +33,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DS_DECL_EXPORT DSWaylandInputMethodContextPrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_method_context { DS_PIMPL_USE_PUBLIC(DSWaylandInputMethodContext); @@ -91,6 +92,7 @@ protected: private: DSWaylandCompositor *__compositor; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputMethodPrivate.h b/src/DSWaylandServer/DSWaylandInputMethodPrivate.h index 49a86cf..90b98e3 100644 --- a/src/DSWaylandServer/DSWaylandInputMethodPrivate.h +++ b/src/DSWaylandServer/DSWaylandInputMethodPrivate.h @@ -33,6 +33,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandInputMethodContextPrivate; class DS_DECL_EXPORT DSWaylandInputMethodPrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_method @@ -58,6 +59,7 @@ private: Resource *__resource; std::multimap __contextMap; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputPanel.cpp b/src/DSWaylandServer/DSWaylandInputPanel.cpp index 191fced..46e643b 100644 --- a/src/DSWaylandServer/DSWaylandInputPanel.cpp +++ b/src/DSWaylandServer/DSWaylandInputPanel.cpp @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandInputPanelFloating { public: @@ -686,6 +687,7 @@ stGeometry DSWaylandInputPanelSurface::getGeometry(DSWaylandSurface *wlSurface) return priv->getGeometry(wlSurface); } +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputPanel.h b/src/DSWaylandServer/DSWaylandInputPanel.h index f9f39fa..c65ec60 100644 --- a/src/DSWaylandServer/DSWaylandInputPanel.h +++ b/src/DSWaylandServer/DSWaylandInputPanel.h @@ -34,6 +34,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandInputPanelPrivate; class DSWaylandInputPanelSurface; class DSWaylandInputPanelFloating; @@ -79,6 +80,7 @@ private: void __onSurfaceCommitted(std::shared_ptr waylandSurfaceCommitInfo); void __onEventIdleEnterer(void *data); }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputPanelPrivate.h b/src/DSWaylandServer/DSWaylandInputPanelPrivate.h index 7de9465..fe4bd53 100644 --- a/src/DSWaylandServer/DSWaylandInputPanelPrivate.h +++ b/src/DSWaylandServer/DSWaylandInputPanelPrivate.h @@ -33,6 +33,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DS_DECL_EXPORT DSWaylandInputPanelPrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_panel { DS_PIMPL_USE_PUBLIC(DSWaylandInputPanel); @@ -47,6 +48,7 @@ protected: private: DSWaylandCompositor *__compositor; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputPanelSurface.h b/src/DSWaylandServer/DSWaylandInputPanelSurface.h index ca90872..825cb57 100644 --- a/src/DSWaylandServer/DSWaylandInputPanelSurface.h +++ b/src/DSWaylandServer/DSWaylandInputPanelSurface.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandInputPanelSurfacePrivate; class DSWaylandSurface; @@ -58,6 +59,7 @@ private: DSWaylandCompositor *__compositor; DSWaylandInputPanel *__inputPanel; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandInputPanelSurfacePrivate.h b/src/DSWaylandServer/DSWaylandInputPanelSurfacePrivate.h index 4896e3c..22e10b3 100644 --- a/src/DSWaylandServer/DSWaylandInputPanelSurfacePrivate.h +++ b/src/DSWaylandServer/DSWaylandInputPanelSurfacePrivate.h @@ -34,6 +34,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandInputPanelSurfaceData; class DS_DECL_EXPORT DSWaylandInputPanelSurfacePrivate : public DSObjectPrivate, public DSWaylandServer::wl_input_panel_surface @@ -70,6 +71,7 @@ private: void __updateSurfaceVisibility(DSWaylandInputPanelSurfaceData *surfaceData); void __appendSurface(Resource *resource, void *inputPanelResource, void *surface); }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandKeyboard.cpp b/src/DSWaylandServer/DSWaylandKeyboard.cpp index 851c169..f61bba7 100644 --- a/src/DSWaylandServer/DSWaylandKeyboard.cpp +++ b/src/DSWaylandServer/DSWaylandKeyboard.cpp @@ -83,6 +83,7 @@ DSWaylandKeyboardPrivate::~DSWaylandKeyboardPrivate() wl_array_release(&__keys); } +/*LCOV_EXCL_START*/ void DSWaylandKeyboardPrivate::keyboard_bind_resource(Resource *resource) { DSLOG_INF("DSWaylandKeyboardPrivate",""); @@ -225,6 +226,7 @@ void DSWaylandKeyboardPrivate::__addClient(struct ::wl_client *wlClient, uint32_ } } } +/*LCOV_EXCL_STOP*/ /* Begin Public Class Implementation */ DSWaylandKeyboard::DSWaylandKeyboard(DSWaylandSeat *seat) diff --git a/src/DSWaylandServer/DSWaylandOutput.cpp b/src/DSWaylandServer/DSWaylandOutput.cpp index 7216dbb..a0f5f7a 100644 --- a/src/DSWaylandServer/DSWaylandOutput.cpp +++ b/src/DSWaylandServer/DSWaylandOutput.cpp @@ -49,6 +49,7 @@ DSWaylandOutputPrivate::~DSWaylandOutputPrivate() { } +/*LCOV_EXCL_START*/ void DSWaylandOutputPrivate::output_bind_resource(wl_output::Resource *resource) { DSLOG_DBG("DSWaylandOutputPriv", ""); @@ -125,6 +126,7 @@ bool DSWaylandOutputPrivate::getBaseResolutionFromAppinfo(Resource *resource, in DSTizenAppinfoMgr::releaseInstance(); return true; } +/*LCOV_EXCL_STOP*/ void DSWaylandOutputPrivate::sendWaylandOutputInfo(void) { diff --git a/src/DSWaylandServer/DSWaylandRegion.cpp b/src/DSWaylandServer/DSWaylandRegion.cpp index 19d3231..406da3c 100644 --- a/src/DSWaylandServer/DSWaylandRegion.cpp +++ b/src/DSWaylandServer/DSWaylandRegion.cpp @@ -28,6 +28,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ /* DSWaylandRegionPrivate */ DSWaylandRegionPrivate::DSWaylandRegionPrivate(DSWaylandRegion *p_ptr) : DSObjectPrivate(p_ptr), @@ -104,5 +105,6 @@ bool DSWaylandRegion::hasResource() return true; return false; } +/*LCOV_EXCL_STOP*/ } /* namespace display_server */ diff --git a/src/DSWaylandServer/DSWaylandRegion.h b/src/DSWaylandServer/DSWaylandRegion.h index 996b583..c4bd950 100644 --- a/src/DSWaylandServer/DSWaylandRegion.h +++ b/src/DSWaylandServer/DSWaylandRegion.h @@ -34,6 +34,7 @@ struct wl_resource; namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandRegionPrivate; class DSWaylandRegion : public DSObject @@ -51,6 +52,7 @@ public: private: }; +/*LCOV_EXCL_STOP*/ } /* namespace display_server */ diff --git a/src/DSWaylandServer/DSWaylandRegionPrivate.h b/src/DSWaylandServer/DSWaylandRegionPrivate.h index d2d6338..f5b6a22 100644 --- a/src/DSWaylandServer/DSWaylandRegionPrivate.h +++ b/src/DSWaylandServer/DSWaylandRegionPrivate.h @@ -30,6 +30,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandRegion; class DSWaylandRegionPrivate : public DSObjectPrivate, public DSWaylandServer::wl_region @@ -51,6 +52,7 @@ protected: private: }; +/*LCOV_EXCL_STOP*/ } /*namespace display_server */ diff --git a/src/DSWaylandServer/DSWaylandSurface.cpp b/src/DSWaylandServer/DSWaylandSurface.cpp index 1eb9b2d..5136242 100644 --- a/src/DSWaylandServer/DSWaylandSurface.cpp +++ b/src/DSWaylandServer/DSWaylandSurface.cpp @@ -58,6 +58,7 @@ DSWaylandSurfaceCommitInfo::DSWaylandSurfaceCommitInfo() DSWaylandSurfaceCommitInfo::~DSWaylandSurfaceCommitInfo() {} +/*LCOV_EXCL_START*/ std::shared_ptr DSWaylandSurfaceCommitInfo::getBuffer() { DS_GET_PRIV(DSWaylandSurfaceCommitInfo); @@ -71,6 +72,7 @@ bool DSWaylandSurfaceCommitInfo::bufferChanged() return priv->bufferChanged; } +/*LCOV_EXCL_STOP*/ /* DSWaylandSurfacePrivate */ static uint32_t tizenResIdCnt = 0; @@ -110,6 +112,7 @@ DSWaylandSurfacePrivate::~DSWaylandSurfacePrivate() DSBufferManager::releaseInstance(); } +/*LCOV_EXCL_START*/ uint32_t DSWaylandSurfacePrivate::getResourceId() { return __resId; @@ -133,6 +136,7 @@ void DSWaylandSurfacePrivate::surface_destroy(Resource *resource) { __sendSurfaceDestroy(); } +/*LCOV_EXCL_STOP*/ void DSWaylandSurfacePrivate::surface_attach(Resource *resource, struct ::wl_resource *buffer, int32_t x, int32_t y) { @@ -164,6 +168,7 @@ void DSWaylandSurfacePrivate::surface_damage(Resource *resource, int32_t x, int3 commitInfoPendingPriv->damageSurface.height = height; } +/*LCOV_EXCL_START*/ void DSWaylandSurfacePrivate::surface_frame(Resource *resource, uint32_t callback) { //TODO: @@ -178,6 +183,7 @@ void DSWaylandSurfacePrivate::surface_set_input_region(Resource *resource, struc { //TODO: } +/*LCOV_EXCL_STOP*/ void DSWaylandSurfacePrivate::surface_commit(Resource *resource) { @@ -200,6 +206,7 @@ void DSWaylandSurfacePrivate::surface_commit(Resource *resource) pub->__surfaceCommittedSignal.emit(__commitInfo); } +/*LCOV_EXCL_START*/ void DSWaylandSurfacePrivate::surface_set_buffer_transform(Resource *resource, int32_t transform) { DSWaylandSurfaceCommitInfoPrivate *commitInfoPendingPriv = DSWaylandSurfaceCommitInfoPrivate::getPrivate(__commitInfoPending.get()); @@ -223,6 +230,7 @@ void DSWaylandSurfacePrivate::surface_damage_buffer(Resource *resource, int32_t commitInfoPendingPriv->damageBuffer.width = width; commitInfoPendingPriv->damageBuffer.height = height; } +/*LCOV_EXCL_STOP*/ void DSWaylandSurfacePrivate::__sendSurfaceDestroy(void) { @@ -287,6 +295,7 @@ bool DSWaylandSurface::hasResource() return false; } +/*LCOV_EXCL_START*/ uint32_t DSWaylandSurface::getResourceId() { DS_GET_PRIV(DSWaylandSurface); @@ -300,5 +309,6 @@ uint32_t DSWaylandSurface::getTizenResourceId() return priv->getTizenResourceId(); } +/*LCOV_EXCL_STOP*/ } /* namespace display_server */ diff --git a/src/DSWaylandServer/DSWaylandTizenIndicator.cpp b/src/DSWaylandServer/DSWaylandTizenIndicator.cpp index 51076c5..6f2916c 100644 --- a/src/DSWaylandServer/DSWaylandTizenIndicator.cpp +++ b/src/DSWaylandServer/DSWaylandTizenIndicator.cpp @@ -27,7 +27,6 @@ namespace display_server { - DSWaylandTizenIndicator::DSWaylandTizenIndicator() : DSObject(), DS_INIT_PRIVATE_PTR(DSWaylandTizenIndicator) { @@ -62,6 +61,7 @@ DSWaylandTizenIndicatorPrivate::~DSWaylandTizenIndicatorPrivate() { } +/*LCOV_EXCL_START*/ void DSWaylandTizenIndicatorPrivate::tizen_indicator_bind_resource(Resource *resource) { } @@ -88,6 +88,7 @@ void DSWaylandTizenIndicatorPrivate::tizen_indicator_set_visible_type(Resource * this->setVisibleType(vtype); } +/*LCOV_EXCL_STOP*/ void DSWaylandTizenIndicatorPrivate::setVisibleType(DSWaylandTizenIndicator::visible_type type) { diff --git a/src/DSWaylandServer/DSWaylandTizenInputDevice.h b/src/DSWaylandServer/DSWaylandTizenInputDevice.h index 241fb85..1bbcc23 100644 --- a/src/DSWaylandServer/DSWaylandTizenInputDevice.h +++ b/src/DSWaylandServer/DSWaylandTizenInputDevice.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenInputDevicePrivate; class DSWaylandTizenInputDevice : public DSObject @@ -47,6 +48,7 @@ public: private: DSWaylandTizenInputDeviceManager *__tzInputDeviceManager; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenInputDeviceManager.h b/src/DSWaylandServer/DSWaylandTizenInputDeviceManager.h index 41920b5..cb2917a 100644 --- a/src/DSWaylandServer/DSWaylandTizenInputDeviceManager.h +++ b/src/DSWaylandServer/DSWaylandTizenInputDeviceManager.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenInputDeviceManagerPrivate; class DSWaylandTizenInputDevice; @@ -52,6 +53,7 @@ private: DSWaylandCompositor *__compositor; DSWaylandTizenInputDevice *__tzInputDevice; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp b/src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp index 9b0c1df..ae5b139 100644 --- a/src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp +++ b/src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp @@ -31,6 +31,7 @@ const int TIZEN_LAUNCH_EFFECT_VERSION = 1; namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandTizenLaunchEffectPrivate::DSWaylandTizenLaunchEffectPrivate(DSWaylandTizenLaunchEffect *p_ptr) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr) @@ -131,5 +132,6 @@ void DSWaylandTizenLaunchEffect::finalize(void) DSLOG_INF("TizenLaunchEffect", "TizenLaunchEffect finalized"); __isCreated = false; } +/*LCOV_EXCL_STOP*/ -} \ No newline at end of file +} diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchEffect.h b/src/DSWaylandServer/DSWaylandTizenLaunchEffect.h index 06a737e..e309ac6 100644 --- a/src/DSWaylandServer/DSWaylandTizenLaunchEffect.h +++ b/src/DSWaylandServer/DSWaylandTizenLaunchEffect.h @@ -29,6 +29,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenLaunchEffectPrivate; class DSWaylandTizenLaunchEffect : public DSObject @@ -49,6 +50,7 @@ private: bool __isCreated; }; +/*LCOV_EXCL_STOP*/ } -#endif \ No newline at end of file +#endif diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h b/src/DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h index ad31c16..8ec0f59 100644 --- a/src/DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h +++ b/src/DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h @@ -31,6 +31,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenLaunchSplash; class DS_DECL_EXPORT DSWaylandTizenLaunchEffectPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_launch_effect @@ -58,6 +59,7 @@ private: std::list> __tzSplashList; }; +/*LCOV_EXCL_STOP*/ } -#endif \ No newline at end of file +#endif diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp b/src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp index 96dd7c0..737af3f 100644 --- a/src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp +++ b/src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp @@ -27,6 +27,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandTizenLaunchSplashPrivate::DSWaylandTizenLaunchSplashPrivate(DSWaylandTizenLaunchSplash *p_ptr) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr) @@ -65,6 +66,6 @@ DSWaylandTizenLaunchSplash::DSWaylandTizenLaunchSplash(DSWaylandClient *waylandC DSWaylandTizenLaunchSplash::~DSWaylandTizenLaunchSplash() {} +/*LCOV_EXCL_STOP*/ - -} \ No newline at end of file +} diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchSplash.h b/src/DSWaylandServer/DSWaylandTizenLaunchSplash.h index 3536c93..c04b995 100644 --- a/src/DSWaylandServer/DSWaylandTizenLaunchSplash.h +++ b/src/DSWaylandServer/DSWaylandTizenLaunchSplash.h @@ -29,6 +29,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenLaunchSplashPrivate; class DSWaylandTizenLaunchSplash : public DSObject @@ -42,6 +43,7 @@ public: private: }; +/*LCOV_EXCL_STOP*/ } #endif diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h b/src/DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h index 6aa9015..72da257 100644 --- a/src/DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h +++ b/src/DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h @@ -31,6 +31,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenLaunchSplash; class DS_DECL_EXPORT DSWaylandTizenLaunchSplashPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_launch_splash @@ -56,6 +57,7 @@ protected: private: }; +/*LCOV_EXCL_STOP*/ } -#endif \ No newline at end of file +#endif diff --git a/src/DSWaylandServer/DSWaylandTizenPolicy.cpp b/src/DSWaylandServer/DSWaylandTizenPolicy.cpp index d33e82a..5076ffb 100644 --- a/src/DSWaylandServer/DSWaylandTizenPolicy.cpp +++ b/src/DSWaylandServer/DSWaylandTizenPolicy.cpp @@ -31,10 +31,8 @@ const int TIZEN_POLICY_VERSION = 7; namespace display_server { -///////////////////////////////// -// DSWaylandTizenPolicyPrivate -///////////////////////////////// +/*LCOV_EXCL_START*/ DSWaylandTizenPolicyPrivate::DSWaylandTizenPolicyPrivate(DSWaylandTizenPolicy *p_ptr) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr) @@ -422,6 +420,7 @@ DSWaylandCompositor *DSWaylandTizenPolicy::getWlCompositor() { return __wlCompositor; } +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTizenPolicy.h b/src/DSWaylandServer/DSWaylandTizenPolicy.h index f526683..ddd6045 100644 --- a/src/DSWaylandServer/DSWaylandTizenPolicy.h +++ b/src/DSWaylandServer/DSWaylandTizenPolicy.h @@ -31,6 +31,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenPolicyPrivate; class DSWaylandTizenPolicy : public DSObject @@ -52,6 +53,7 @@ private: DSWaylandCompositor *__wlCompositor; bool __isCreated; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenPolicyExt.cpp b/src/DSWaylandServer/DSWaylandTizenPolicyExt.cpp index 2ffff5b..7e9c9f2 100644 --- a/src/DSWaylandServer/DSWaylandTizenPolicyExt.cpp +++ b/src/DSWaylandServer/DSWaylandTizenPolicyExt.cpp @@ -27,6 +27,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ /* DSWaylandTizenPolicyExt */ DSWaylandTizenPolicyExtPrivate::DSWaylandTizenPolicyExtPrivate(DSWaylandTizenPolicyExt *p_ptr, DSWaylandCompositor *compositor) : DSObjectPrivate(p_ptr), @@ -158,5 +159,6 @@ struct ::wl_resource *DSWaylandTizenRotation::getRotationSurface(void) return priv->getRotationSurface(); } +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTizenPolicyExt.h b/src/DSWaylandServer/DSWaylandTizenPolicyExt.h index eef13dc..27b8119 100644 --- a/src/DSWaylandServer/DSWaylandTizenPolicyExt.h +++ b/src/DSWaylandServer/DSWaylandTizenPolicyExt.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenPolicyExtPrivate; class DSWaylandTizenRotationPrivate; @@ -60,6 +61,7 @@ public: DSWaylandTizenRotation *getTizenRotation(struct ::wl_resource *surface); void delTizenRotation(DSWaylandTizenRotation *resource); }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenPolicyPrivate.h b/src/DSWaylandServer/DSWaylandTizenPolicyPrivate.h index ac08165..e917d2e 100644 --- a/src/DSWaylandServer/DSWaylandTizenPolicyPrivate.h +++ b/src/DSWaylandServer/DSWaylandTizenPolicyPrivate.h @@ -31,6 +31,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenVisibility; class DSWaylandTizenPosition; @@ -96,6 +97,7 @@ private: std::list> __tzPosList; std::list> __tzVisList; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenPosition.cpp b/src/DSWaylandServer/DSWaylandTizenPosition.cpp index 7b0455a..34e4dbf 100644 --- a/src/DSWaylandServer/DSWaylandTizenPosition.cpp +++ b/src/DSWaylandServer/DSWaylandTizenPosition.cpp @@ -28,6 +28,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandTizenPosition::DSWaylandTizenPosition(struct ::wl_client *client, uint32_t id, int version, struct ::wl_resource *surface) : DSObject(), DS_INIT_PRIVATE_PTR(DSWaylandTizenPosition) { @@ -88,6 +89,6 @@ void DSWaylandTizenPositionPrivate::tizen_position_set(Resource *resource, int32 wm->setWindowPosition(__dswlSurface, x, y); DSWindowManager::releaseInstance(); } - +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTizenPosition.h b/src/DSWaylandServer/DSWaylandTizenPosition.h index f6a0396..084fe1e 100644 --- a/src/DSWaylandServer/DSWaylandTizenPosition.h +++ b/src/DSWaylandServer/DSWaylandTizenPosition.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenPositionPrivate; class DSWaylandTizenPosition : public DSObject @@ -48,6 +49,7 @@ protected: private: }; +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTizenSurface.cpp b/src/DSWaylandServer/DSWaylandTizenSurface.cpp index e430097..d0f933d 100644 --- a/src/DSWaylandServer/DSWaylandTizenSurface.cpp +++ b/src/DSWaylandServer/DSWaylandTizenSurface.cpp @@ -27,6 +27,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ /* DSWaylandTizenSurface */ DSWaylandTizenSurfacePrivate::DSWaylandTizenSurfacePrivate(DSWaylandTizenSurface *p_ptr, DSWaylandCompositor *compositor) : DSObjectPrivate(p_ptr), @@ -219,5 +220,6 @@ uint32_t DSWaylandTizenResource::getResourceId(void) return priv->getResourceId(); } +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTizenSurface.h b/src/DSWaylandServer/DSWaylandTizenSurface.h index 6621b53..3b56188 100644 --- a/src/DSWaylandServer/DSWaylandTizenSurface.h +++ b/src/DSWaylandServer/DSWaylandTizenSurface.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenSurfacePrivate; class DSWaylandTizenResourcePrivate; @@ -60,6 +61,7 @@ public: DSWaylandTizenResource *getTizenResource(struct ::wl_resource *surface); void delTizenResource(DSWaylandTizenResource *resource); }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp index ae1147c..4fd5917 100644 --- a/src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp @@ -27,6 +27,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ /* DSWaylandTizenSurfaceShm */ DSWaylandTizenSurfaceShmPrivate::DSWaylandTizenSurfaceShmPrivate(DSWaylandTizenSurfaceShm *p_ptr, DSWaylandCompositor *compositor) : DSObjectPrivate(p_ptr), @@ -163,5 +164,6 @@ struct ::wl_resource *DSWaylandTizenSurfaceShmFlusher::getShmFlusherSurface(void return priv->getShmFlusherSurface(); } +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShm.h b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.h index 350f80e..8adf4b2 100644 --- a/src/DSWaylandServer/DSWaylandTizenSurfaceShm.h +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenSurfaceShmPrivate; class DSWaylandTizenSurfaceShmFlusherPrivate; @@ -58,6 +59,7 @@ public: DSWaylandTizenSurfaceShmFlusher *getShmFlusher(DSWaylandTizenSurfaceShm *TizenSurfaceShm); }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenVisibility.cpp b/src/DSWaylandServer/DSWaylandTizenVisibility.cpp index 3bc43ff..77b7507 100644 --- a/src/DSWaylandServer/DSWaylandTizenVisibility.cpp +++ b/src/DSWaylandServer/DSWaylandTizenVisibility.cpp @@ -28,6 +28,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandTizenVisibilityPrivate::DSWaylandTizenVisibilityPrivate(DSWaylandTizenVisibility *p_ptr) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr), @@ -76,6 +77,6 @@ void DSWaylandTizenVisibility::init(struct ::wl_client *client, uint32_t id, int DS_GET_PRIV(DSWaylandTizenVisibility); priv->init(client, id, version, surface); } - +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTizenVisibility.h b/src/DSWaylandServer/DSWaylandTizenVisibility.h index a0fe5d3..da6dbf2 100644 --- a/src/DSWaylandServer/DSWaylandTizenVisibility.h +++ b/src/DSWaylandServer/DSWaylandTizenVisibility.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenVisibilityPrivate; class DSWaylandTizenVisibility : public DSObject @@ -44,6 +45,7 @@ public: void init(struct ::wl_client *client, uint32_t id, int version, struct ::wl_resource *surface); }; +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandTouch.cpp b/src/DSWaylandServer/DSWaylandTouch.cpp index 4044a6b..248a198 100644 --- a/src/DSWaylandServer/DSWaylandTouch.cpp +++ b/src/DSWaylandServer/DSWaylandTouch.cpp @@ -46,6 +46,7 @@ DSWaylandTouchPrivate::~DSWaylandTouchPrivate() { } +/*LCOV_EXCL_START*/ void DSWaylandTouchPrivate::setFocus(DSWaylandSurface *waylandSurface) { DSLOG_INF("DSWaylandTouchPrivate", "touch focus changed (%p -> %p)", __waylandSurface, waylandSurface); @@ -76,12 +77,14 @@ void DSWaylandTouchPrivate::setFocus(DSWaylandSurface *waylandSurface) } } +/*LCOV_EXCL_STOP*/ DSWaylandSurface *DSWaylandTouchPrivate::getFocus() { return __waylandSurface; } +/*LCOV_EXCL_START*/ void DSWaylandTouchPrivate::touch_bind_resource(Resource *resource) { DSLOG_INF("DSWaylandTouchPrivate",""); @@ -97,6 +100,7 @@ void DSWaylandTouchPrivate::touch_release(Resource *resource) DSLOG_INF("DSWaylandTouchPrivate",""); wl_resource_destroy(resource->handle); } +/*LCOV_EXCL_STOP*/ /*LCOV_EXCL_START*/ void DSWaylandTouchPrivate::sendDown(int32_t id, int x, int y) @@ -149,6 +153,7 @@ DSWaylandSeat *DSWaylandTouch::seat() return priv->__seat; } +/*LCOV_EXCL_START*/ void DSWaylandTouch::addClient(DSWaylandClient *client, uint32_t id, int version) { DS_GET_PRIV(DSWaylandTouch); @@ -157,6 +162,7 @@ void DSWaylandTouch::addClient(DSWaylandClient *client, uint32_t id, int version priv->add(client->wlClient(), id, version); } +/*LCOV_EXCL_STOP*/ void DSWaylandTouch::setFocus(DSWaylandSurface *waylandSurface) { diff --git a/src/DSWaylandServer/DSWaylandTouch.h b/src/DSWaylandServer/DSWaylandTouch.h index 8f251c1..203bbc6 100644 --- a/src/DSWaylandServer/DSWaylandTouch.h +++ b/src/DSWaylandServer/DSWaylandTouch.h @@ -30,6 +30,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandSeat; class DSWaylandTouchPrivate; class DSWaylandClient; @@ -58,6 +59,7 @@ protected: private: }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp b/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp index 40ba862..e3e49bf 100644 --- a/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp +++ b/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp @@ -36,6 +36,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ /****************************************** DSWaylandZxdgShellV6 *****************************************/ @@ -676,6 +677,7 @@ void DSWaylandZxdgPopupV6Private::zxdg_popup_v6_destroy(zxdg_popup_v6::Resource void DSWaylandZxdgPopupV6Private::zxdg_popup_v6_grab(zxdg_popup_v6::Resource *resource, struct ::wl_resource *seat, uint32_t serial) { } +/*LCOV_EXCL_STOP*/ } // namespace display_server diff --git a/src/DSWaylandServer/DSWaylandZxdgShellV6.h b/src/DSWaylandServer/DSWaylandZxdgShellV6.h index 0ba2f2a..8c539c2 100644 --- a/src/DSWaylandServer/DSWaylandZxdgShellV6.h +++ b/src/DSWaylandServer/DSWaylandZxdgShellV6.h @@ -34,6 +34,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandCompositor; class DSWaylandZxdgShellV6; class DSWaylandZxdgPositionerV6; @@ -145,7 +146,7 @@ public: void init(DSWaylandZxdgSurfaceV6 *zxdgSurface, struct ::wl_client *client, int id, int ver); void sendConfigure(int x, int y, unsigned int w, unsigned int h); }; - +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandZxdgShellV6Private.h b/src/DSWaylandServer/DSWaylandZxdgShellV6Private.h index 0369b2e..bd35be9 100644 --- a/src/DSWaylandServer/DSWaylandZxdgShellV6Private.h +++ b/src/DSWaylandServer/DSWaylandZxdgShellV6Private.h @@ -32,6 +32,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandZxdgShellV6Private : public DSObjectPrivate, public DSWaylandServer::zxdg_shell_v6 { DS_PIMPL_USE_PUBLIC(DSWaylandZxdgShellV6); @@ -181,7 +182,7 @@ protected: private: DSWaylandZxdgSurfaceV6 *__zxdgSurface; }; - +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/IDSWaylandShell.h b/src/DSWaylandServer/IDSWaylandShell.h index d64a1bc..0de876a 100644 --- a/src/DSWaylandServer/IDSWaylandShell.h +++ b/src/DSWaylandServer/IDSWaylandShell.h @@ -33,6 +33,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class IDSWaylandShellSurface; class IDSWaylandShell : public DSObject @@ -59,7 +60,7 @@ public: virtual void sendConfigure(int x, int y, unsigned int w, unsigned int h) = 0; }; - +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/dswayland-server-tizen-extension.cpp b/src/DSWaylandServer/dswayland-server-tizen-extension.cpp index 66269f9..15a014c 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-extension.cpp +++ b/src/DSWaylandServer/dswayland-server-tizen-extension.cpp @@ -1971,7 +1971,6 @@ namespace DSWaylandServer { y); } -/*LCOV_EXCL_START*/ tizen_move_resize::tizen_move_resize(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -2201,9 +2200,7 @@ namespace DSWaylandServer { h, error_state); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_gesture::tizen_gesture(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -2841,9 +2838,7 @@ namespace DSWaylandServer { active, error); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_keyrouter::tizen_keyrouter(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -3361,9 +3356,7 @@ namespace DSWaylandServer { key, mode); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_screenshooter::tizen_screenshooter(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -3610,9 +3603,7 @@ namespace DSWaylandServer { resource, noti); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_screenmirror::tizen_screenmirror(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -3922,9 +3913,7 @@ namespace DSWaylandServer { tizen_screenmirror_send_stop( resource); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_video::tizen_video(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -4153,9 +4142,7 @@ namespace DSWaylandServer { resource, format); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_video_object::tizen_video_object(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -4455,9 +4442,7 @@ namespace DSWaylandServer { max_h, prefer_align); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_subsurface_watcher::tizen_subsurface_watcher(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -4648,9 +4633,7 @@ namespace DSWaylandServer { resource, value); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_viewport::tizen_viewport(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -5019,9 +5002,7 @@ namespace DSWaylandServer { width, height); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_destination_mode::tizen_destination_mode(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -5320,9 +5301,7 @@ namespace DSWaylandServer { w, h); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_embedded_compositor::tizen_embedded_compositor(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -5528,9 +5507,7 @@ namespace DSWaylandServer { resource, sock_fd); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_input_device_manager::tizen_input_device_manager(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -5560,7 +5537,6 @@ namespace DSWaylandServer { { init(resource); } -/*LCOV_EXCL_STOP*/ tizen_input_device_manager::tizen_input_device_manager() : m_resource_map() @@ -5585,7 +5561,6 @@ namespace DSWaylandServer { } } -/*LCOV_EXCL_START*/ void tizen_input_device_manager::init(struct ::wl_client *client, uint32_t id, int version) { m_resource = bind(client, id, version); @@ -5602,7 +5577,6 @@ namespace DSWaylandServer { m_resource_map.insert(std::pair(client, resource)); return resource; } -/*LCOV_EXCL_STOP*/ tizen_input_device_manager::Resource *tizen_input_device_manager::add(struct ::wl_client *client, uint32_t id, int version) { @@ -5701,7 +5675,6 @@ namespace DSWaylandServer { tizen_input_device_manager::handle_generate_axis }; -/*LCOV_EXCL_START*/ void tizen_input_device_manager::tizen_input_device_manager_block_events(Resource *, uint32_t , uint32_t , uint32_t ) { } @@ -5990,9 +5963,7 @@ namespace DSWaylandServer { tizen_input_device_manager_send_block_expired( resource); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_input_device::tizen_input_device(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -6022,7 +5993,6 @@ namespace DSWaylandServer { { init(resource); } -/*LCOV_EXCL_STOP*/ tizen_input_device::tizen_input_device() : m_resource_map() @@ -6047,7 +6017,6 @@ namespace DSWaylandServer { } } -/*LCOV_EXCL_START*/ void tizen_input_device::init(struct ::wl_client *client, uint32_t id, int version) { m_resource = bind(client, id, version); @@ -6057,7 +6026,6 @@ namespace DSWaylandServer { { m_resource = bind(resource); } -/*LCOV_EXCL_STOP*/ tizen_input_device::Resource *tizen_input_device::add(struct ::wl_client *client, int version) { @@ -6066,7 +6034,6 @@ namespace DSWaylandServer { return resource; } -/*LCOV_EXCL_START*/ tizen_input_device::Resource *tizen_input_device::add(struct ::wl_client *client, uint32_t id, int version) { Resource *resource = bind(client, id, version); @@ -6082,7 +6049,6 @@ namespace DSWaylandServer { m_displayDestroyedListener.parent = this; wl_display_add_destroy_listener(display, &m_displayDestroyedListener); } -/*LCOV_EXCL_STOP*/ const struct wl_interface *tizen_input_device::interface() { @@ -6102,13 +6068,11 @@ namespace DSWaylandServer { { } -/*LCOV_EXCL_START*/ void tizen_input_device::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id) { tizen_input_device *that = static_cast(data); that->add(client, id, std::min(that->m_globalVersion, version)); } -/*LCOV_EXCL_STOP*/ void tizen_input_device::display_destroy_func(struct ::wl_listener *listener, void *data) { @@ -6158,7 +6122,6 @@ namespace DSWaylandServer { tizen_input_device::handle_release }; -/*LCOV_EXCL_START*/ void tizen_input_device::tizen_input_device_select_axes(Resource *, struct ::wl_array *) { } @@ -6260,9 +6223,7 @@ namespace DSWaylandServer { axis_type, value); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_launchscreen::tizen_launchscreen(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -6451,9 +6412,7 @@ namespace DSWaylandServer { static_cast(r->tizen_launchscreen_object)->tizen_launchscreen_destroy( r); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_launch_image::tizen_launch_image(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -6699,9 +6658,7 @@ namespace DSWaylandServer { static_cast(r->tizen_launch_image_object)->tizen_launch_image_hide( r); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_effect::tizen_effect(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -6916,9 +6873,7 @@ namespace DSWaylandServer { surface, type); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_display_policy::tizen_display_policy(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -7132,7 +7087,6 @@ namespace DSWaylandServer { brightness, error_state); } -/*LCOV_EXCL_STOP*/ tizen_indicator::tizen_indicator(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() @@ -7384,7 +7338,6 @@ namespace DSWaylandServer { type); } -/*LCOV_EXCL_START*/ tizen_clipboard::tizen_clipboard(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -7646,9 +7599,7 @@ namespace DSWaylandServer { resource, allowed); } -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ tizen_screen_rotation::tizen_screen_rotation(struct ::wl_client *client, uint32_t id, int version) : m_resource_map() , m_resource(NULL) @@ -7861,5 +7812,3 @@ namespace DSWaylandServer { } /*LCOV_EXCL_STOP*/ - -/*LCOV_EXCL_STOP*/ diff --git a/src/DSWaylandServer/dswayland-server-tizen-extension.h b/src/DSWaylandServer/dswayland-server-tizen-extension.h index 509acfc..cdc2b1f 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-extension.h +++ b/src/DSWaylandServer/dswayland-server-tizen-extension.h @@ -745,7 +745,6 @@ namespace DSWaylandServer { DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_START*/ class tizen_move_resize { public: @@ -845,9 +844,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_gesture { public: @@ -1059,9 +1056,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_keyrouter { public: @@ -1241,9 +1236,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_screenshooter { public: @@ -1340,9 +1333,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_screenmirror { public: @@ -1463,9 +1454,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_video { public: @@ -1567,9 +1556,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_video_object { public: @@ -1677,9 +1664,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_subsurface_watcher { public: @@ -1769,9 +1754,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_viewport { public: @@ -1903,9 +1886,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_destination_mode { public: @@ -2038,9 +2019,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_embedded_compositor { public: @@ -2128,7 +2107,6 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ class tizen_input_device_manager { @@ -2431,7 +2409,6 @@ namespace DSWaylandServer { DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_START*/ class tizen_launchscreen { public: @@ -2517,9 +2494,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_launch_image { public: @@ -2640,9 +2615,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_effect { public: @@ -2735,9 +2708,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_display_policy { public: @@ -2832,7 +2803,6 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ class tizen_indicator { @@ -2955,7 +2925,6 @@ namespace DSWaylandServer { DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_START*/ class tizen_clipboard { public: @@ -3056,9 +3025,7 @@ namespace DSWaylandServer { }; DisplayDestroyedListener m_displayDestroyedListener; }; -/*LCOV_EXCL_STOP*/ -/*LCOV_EXCL_START*/ class tizen_screen_rotation { public: @@ -3151,4 +3118,3 @@ namespace DSWaylandServer { /*LCOV_EXCL_STOP*/ #endif -/*LCOV_EXCL_STOP*/ -- 2.7.4 From d479b3deb077668c35944991d2e23f43c331e762 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Mon, 7 Sep 2020 17:47:02 +0900 Subject: [PATCH 09/16] tests: enhance the coverage for DSWaylandSurface Change-Id: I708a6fc597911c54d9bfe7711fc2563b82dfb8d9 --- tests/DSWaylandSurface-test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/DSWaylandSurface-test.cpp b/tests/DSWaylandSurface-test.cpp index a83d794..d8db123 100644 --- a/tests/DSWaylandSurface-test.cpp +++ b/tests/DSWaylandSurface-test.cpp @@ -137,6 +137,10 @@ TEST_F(DSWaylandSurfaceTest, registerCallbackSurfaceCommitted) wl_surface_attach(testClient->surface, testClient->buffer, 0, 0); wl_surface_damage(testClient->surface, 0, 0, 100, 100); + wl_surface_set_buffer_transform(testClient->surface, 0); + wl_surface_set_buffer_scale(testClient->surface, 1); + wl_surface_damage_buffer(testClient->surface, 0, 0, 100, 100); + wl_surface_frame(testClient->surface); wl_surface_commit(testClient->surface); wl_display_roundtrip(testClient->display); -- 2.7.4 From 36b7c4672f054b25db540ed1375a1efd1d4d6ff5 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Wed, 2 Sep 2020 14:23:01 +0900 Subject: [PATCH 10/16] DSRenderViewDaliImpl:Renaming PropertyBuffer to VertexBuffer Change-Id: I4e5987f9508f4d212484cf4c3b74a22a22233219 Signed-off-by: SooChan Lim --- src/DSRender/DSRenderViewDaliImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DSRender/DSRenderViewDaliImpl.cpp b/src/DSRender/DSRenderViewDaliImpl.cpp index 6595726..b8f4881 100644 --- a/src/DSRender/DSRenderViewDaliImpl.cpp +++ b/src/DSRender/DSRenderViewDaliImpl.cpp @@ -65,13 +65,13 @@ Geometry DSRenderViewDaliImpl::CreateTexturedQuad() { Vector2(-0.5f, 0.5f), Vector2(0.0f, 1.0f) }, { Vector2(0.5f, 0.5f), Vector2(1.0f, 1.0f) } }; - PropertyBuffer vertexBuffer; + VertexBuffer vertexBuffer; Property::Map vertexFormat; vertexFormat["aPosition"] = Property::VECTOR2; vertexFormat["aTexCoord"] = Property::VECTOR2; //Create a vertex buffer for vertex positions and texture coordinates - vertexBuffer = PropertyBuffer::New(vertexFormat); + vertexBuffer = VertexBuffer::New(vertexFormat); vertexBuffer.SetData(data, 4u); //Create the geometry -- 2.7.4 From b48a2f1a31693c2f9d4da9417f4bd6d9980e3d9e Mon Sep 17 00:00:00 2001 From: "Junseok, Kim" Date: Tue, 8 Sep 2020 11:31:02 +0900 Subject: [PATCH 11/16] DSKeyboard: add LCOV_EXCL for event functions Change-Id: I45e0b13abc87f14bbf831a4e2ad96bae6dc5c9db Signed-off-by: Junseok, Kim --- src/DSSeat/DSKeyboard.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DSSeat/DSKeyboard.cpp b/src/DSSeat/DSKeyboard.cpp index c97f7e7..6b1180f 100644 --- a/src/DSSeat/DSKeyboard.cpp +++ b/src/DSSeat/DSKeyboard.cpp @@ -55,6 +55,7 @@ DSKeyboard::DSKeyboard(DSSeat *seat, DSWaylandKeyboard *keyboard) DSKeyboard::~DSKeyboard() {} +/*LCOV_EXCL_START*/ void DSKeyboard::processEvent(DSInputKeyboardEvent *ev, void *data) { //TODO : get kbdFocus and send event to it via DSWaylandKeyboard instance @@ -79,6 +80,7 @@ void DSKeyboard::processEvent(DSInputKeyboardEvent *ev, void *data) } } +/*LCOV_EXCL_STOP*/ void DSKeyboard::keyDown(uint32_t keycode) { @@ -112,6 +114,7 @@ void DSKeyboard::setRepeatDelay(uint32_t delay) } } +/*LCOV_EXCL_START*/ void DSKeyboard::setFocus(std::shared_ptr window) { if (!window) @@ -143,7 +146,9 @@ void DSKeyboard::setFocus(std::shared_ptr window) __dswlKeyboard->setFocus(waylandSurface); } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSKeyboard::resetFocus() { if (__kbdFocus) @@ -155,6 +160,7 @@ void DSKeyboard::resetFocus() if (__dswlKeyboard) __dswlKeyboard->resetFocus(); } +/*LCOV_EXCL_STOP*/ std::shared_ptr DSKeyboard::getFocus() { -- 2.7.4 From bd5a0aae8271f3d95d27070ccc1de4b4ab43f51f Mon Sep 17 00:00:00 2001 From: "Junseok, Kim" Date: Tue, 8 Sep 2020 11:31:23 +0900 Subject: [PATCH 12/16] DSPointer: add LCOV_EXCL for event functions Change-Id: I62ea6fc6e6ac9cfe7d0369410a85426b4be66864 Signed-off-by: Junseok, Kim --- src/DSSeat/DSPointer.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/DSSeat/DSPointer.cpp b/src/DSSeat/DSPointer.cpp index 02e3b3b..2f7b1e1 100644 --- a/src/DSSeat/DSPointer.cpp +++ b/src/DSSeat/DSPointer.cpp @@ -51,6 +51,7 @@ DSPointer::DSPointer(DSSeat *seat, DSWaylandPointer *pointer) DSPointer::~DSPointer() {} +/*LCOV_EXCL_START*/ void DSPointer::processEvent(DSInputMouseEvent *ev, void *data) { //TODO : get ptrFocus and send event to it via DSWaylandPointer instance @@ -99,7 +100,9 @@ void DSPointer::processEvent(DSInputMouseEvent *ev, void *data) return; } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSPointer::mouseDown(uint32_t button) { if (__ptrFocus && __dswlPointer) @@ -107,7 +110,9 @@ void DSPointer::mouseDown(uint32_t button) __dswlPointer->sendButtonDown(button); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSPointer::mouseUp(uint32_t button) { if (__ptrFocus && __dswlPointer) @@ -115,7 +120,9 @@ void DSPointer::mouseUp(uint32_t button) __dswlPointer->sendButtonUp(button); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSPointer::mouseMove(int x, int y) { if (__ptrFocus && __dswlPointer) @@ -123,7 +130,9 @@ void DSPointer::mouseMove(int x, int y) __dswlPointer->sendMotion(x, y); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSPointer::mouseIn(int x, int y) { if (__dswlPointer) @@ -131,7 +140,9 @@ void DSPointer::mouseIn(int x, int y) __dswlPointer->sendEnter(x, y); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSPointer::mouseOut() { if (__dswlPointer) @@ -139,7 +150,9 @@ void DSPointer::mouseOut() __dswlPointer->sendLeave(); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSPointer::setFocus(std::shared_ptr window) { if (!window) @@ -170,7 +183,9 @@ void DSPointer::setFocus(std::shared_ptr window) __dswlPointer->setFocus(waylandSurface); } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSPointer::resetFocus() { if (__ptrFocus) @@ -182,6 +197,7 @@ void DSPointer::resetFocus() if (__dswlPointer) __dswlPointer->resetFocus(); } +/*LCOV_EXCL_STOP*/ std::shared_ptr DSPointer::getFocus() { -- 2.7.4 From fc530b455818e33dc67689feb53902d88e3d8184 Mon Sep 17 00:00:00 2001 From: "Junseok, Kim" Date: Tue, 8 Sep 2020 11:31:40 +0900 Subject: [PATCH 13/16] DSSeat: add LCOV_EXCL for event functions Change-Id: If93d9a62ca14f7f0d0645b7ecbf82afa8beb191f Signed-off-by: Junseok, Kim --- src/DSSeat/DSSeat.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/DSSeat/DSSeat.cpp b/src/DSSeat/DSSeat.cpp index 87e69fb..bc1470d 100644 --- a/src/DSSeat/DSSeat.cpp +++ b/src/DSSeat/DSSeat.cpp @@ -203,6 +203,7 @@ void DSSeat::slotDeviceAdd(std::shared_ptr device) } } +/*LCOV_EXCL_START*/ void DSSeat::slotDeviceRemove(std::shared_ptr device) { DSLOG_INF("DSSeat", ""); @@ -248,6 +249,7 @@ void DSSeat::slotDeviceRemove(std::shared_ptr device) if (capNeedUpdate) __dswlSeat->setCapability((DSWaylandSeat::seatCapability)cap); } +/*LCOV_EXCL_STOP*/ void DSSeat::addPointer() { @@ -269,6 +271,7 @@ void DSSeat::addPointer() __numPointer++; } +/*LCOV_EXCL_START*/ void DSSeat::addKeyboard() { if (0 < __numKeyboard) @@ -288,7 +291,9 @@ void DSSeat::addKeyboard() __numKeyboard++; } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::addTouch() { if (0 < __numTouch) @@ -308,7 +313,9 @@ void DSSeat::addTouch() __numTouch++; } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::removePointer() { if (0 >= __numPointer) @@ -330,7 +337,9 @@ void DSSeat::removePointer() __pointer = nullptr; } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::removeKeyboard() { if (0 >= __numKeyboard) @@ -352,7 +361,9 @@ void DSSeat::removeKeyboard() __keyboard = nullptr; } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::removeTouch() { if (0 >= __numTouch) @@ -374,6 +385,7 @@ void DSSeat::removeTouch() __touch = nullptr; } } +/*LCOV_EXCL_STOP*/ bool DSSeat::hasPointer() { @@ -400,6 +412,7 @@ std::string DSSeat::getName() return __dswlSeat->getName(); } +/*LCOV_EXCL_START*/ void DSSeat::__onKeyEvent(DSInputKeyboardEvent *ev) { if (__keyboard == nullptr) @@ -411,7 +424,9 @@ void DSSeat::__onKeyEvent(DSInputKeyboardEvent *ev) __dswlSeat->setCurrentEventTime(ev->getTimestamp()); __keyboard->processEvent(ev, nullptr); } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::__onPointerEvent(DSInputMouseEvent *ev) { if (__pointer == nullptr) @@ -463,7 +478,9 @@ void DSSeat::__onPointerEvent(DSInputMouseEvent *ev) __pointer->processEvent(ev, nullptr); } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::__onTouchEvent(DSInputTouchEvent *ev) { int winX; @@ -514,12 +531,16 @@ void DSSeat::__onTouchEvent(DSInputTouchEvent *ev) __dswlSeat->setCurrentEventTime(ev->getTimestamp()); __touch->processEvent(ev, nullptr); } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::__onWindowStackChanged(std::shared_ptr topWindow) { __stackChanged = true; } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::__onWindowCreated(std::shared_ptr window) { DSLOG_INF("DSSeat", "window created : %p (%p)", window, window.get()); @@ -547,7 +568,9 @@ void DSSeat::__onWindowCreated(std::shared_ptr window) } } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSSeat::__onWindowDestroy(std::shared_ptr window) { DSLOG_INF("DSSeat", "window destroy : %p (%p)", window, window.get()); @@ -588,7 +611,9 @@ void DSSeat::__onWindowDestroy(std::shared_ptr window) } } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ Eina_Bool DSSeat::inputEventHandlerKey(void *data, int type, void *event) { DSInputKeyboardEvent *ev = static_cast< DSInputKeyboardEvent* >(event); @@ -596,7 +621,9 @@ Eina_Bool DSSeat::inputEventHandlerKey(void *data, int type, void *event) return EINA_TRUE; } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ Eina_Bool DSSeat::inputEventHandlerMouse(void *data, int type, void *event) { DSInputMouseEvent *ev = static_cast< DSInputMouseEvent* >(event); @@ -604,7 +631,9 @@ Eina_Bool DSSeat::inputEventHandlerMouse(void *data, int type, void *event) return EINA_TRUE; } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ Eina_Bool DSSeat::inputEventHandlerTouch(void *data, int type, void *event) { DSInputTouchEvent *ev = static_cast< DSInputTouchEvent* >(event); @@ -612,6 +641,7 @@ Eina_Bool DSSeat::inputEventHandlerTouch(void *data, int type, void *event) return EINA_TRUE; } +/*LCOV_EXCL_STOP*/ std::shared_ptr DSSeat::getTopWindow(std::shared_ptr winExcl) { -- 2.7.4 From f6db906d6a8c0c7565f570dd0a88dc7d6ad680e2 Mon Sep 17 00:00:00 2001 From: "Junseok, Kim" Date: Tue, 8 Sep 2020 11:32:01 +0900 Subject: [PATCH 14/16] DSTouch: add LCOV_EXCL for event functions Change-Id: I93abbda15d38e9746f474eb2461bd40e42af3220 Signed-off-by: Junseok, Kim --- src/DSSeat/DSTouch.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/DSSeat/DSTouch.cpp b/src/DSSeat/DSTouch.cpp index 37b17fb..a9fe988 100644 --- a/src/DSSeat/DSTouch.cpp +++ b/src/DSSeat/DSTouch.cpp @@ -49,6 +49,7 @@ DSTouch::DSTouch(DSSeat *seat, DSWaylandTouch *touch) DSTouch::~DSTouch() {} +/*LCOV_EXCL_START*/ void DSTouch::processEvent(DSInputTouchEvent *ev, void *data) { //TODO : get touchFocus and send event to it via DSWaylandTouch instance @@ -80,7 +81,9 @@ void DSTouch::processEvent(DSInputTouchEvent *ev, void *data) touchMove(ev->getIndex(), ev->getWinX(), ev->getWinY()); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSTouch::touchDown(int32_t id, int x, int y) { if (__touchFocus && __dswlTouch) @@ -88,7 +91,9 @@ void DSTouch::touchDown(int32_t id, int x, int y) __dswlTouch->sendDown(id, x, y); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSTouch::touchUp(int32_t id) { if (__touchFocus && __dswlTouch) @@ -96,7 +101,9 @@ void DSTouch::touchUp(int32_t id) __dswlTouch->sendUp(id); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSTouch::touchMove(int32_t id, int x, int y) { if (__touchFocus && __dswlTouch) @@ -104,7 +111,9 @@ void DSTouch::touchMove(int32_t id, int x, int y) __dswlTouch->sendMotion(id, x, y); } } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSTouch::setFocus(std::shared_ptr window) { if (!window) @@ -135,7 +144,9 @@ void DSTouch::setFocus(std::shared_ptr window) __dswlTouch->setFocus(waylandSurface); } +/*LCOV_EXCL_STOP*/ +/*LCOV_EXCL_START*/ void DSTouch::resetFocus() { if (__touchFocus) @@ -147,6 +158,7 @@ void DSTouch::resetFocus() if (__dswlTouch) __dswlTouch->resetFocus(); } +/*LCOV_EXCL_STOP*/ std::shared_ptr DSTouch::getFocus() { -- 2.7.4 From ae37d48b7e219c96750d19aac73eae58c1669d40 Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Tue, 8 Sep 2020 11:35:21 +0900 Subject: [PATCH 15/16] DSUtil: define LCOV_EXCL blocks for error handling code Change-Id: I4f2eedf8056e040c5698c0ec31984d982640c423 Signed-off-by: Sung-Jin Park --- src/DSUtil/DSUtilSocket.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/DSUtil/DSUtilSocket.cpp b/src/DSUtil/DSUtilSocket.cpp index 9c0e0ff..0e25111 100644 --- a/src/DSUtil/DSUtilSocket.cpp +++ b/src/DSUtil/DSUtilSocket.cpp @@ -112,8 +112,10 @@ void DSUtilSocket::initSocket(std::string socketName) int nameLength = socketName.length(); if ((dirLength + nameLength + 2) > STRERR_BUFSIZE) { + /*LCOV_EXCL_START*/ DSLOG_WRN("DSUtilSocket", "Size of buffer is not enough. dir:%s name:%s", xdgDir, socketName); return; + /*LCOV_EXCL_STOP*/ } //snprintf(socket_path, sizeof(socket_path), "%s/%s", dir, name); @@ -125,17 +127,21 @@ void DSUtilSocket::initSocket(std::string socketName) res = chmod(socketPath.c_str(), 509); if (res < 0) { + /*LCOV_EXCL_START*/ DSLOG_WRN("DSUtilSocket", "Could not change modes of socket file:%s (%s)", socketPath.c_str(), strerror_r(errno, buf, STRERR_BUFSIZE)); //PRCTL("[Winsys] Could not chane modes of socket file: %s", socketPath.c_str()); return; + /*LCOV_EXCL_STOP*/ } res = chown(socketPath.c_str(), uid, gid); if (res < 0) { + /*LCOV_EXCL_START*/ DSLOG_WRN("DSUtilSocket", "Could not change owner of socket file:%s (%s)", socketPath.c_str(), strerror_r(errno, buf, STRERR_BUFSIZE)); //PRCTL("[Winsys] Could not change owner of socket file: %s", socketPath.c_str()); return; + /*LCOV_EXCL_STOP*/ } } @@ -156,26 +162,32 @@ int DSUtilSocket::__getpwnam(std::string name) buf = (char *)malloc(bufLen); if (buf == NULL) { + /*LCOV_EXCL_START*/ DSLOG_WRN("DSUtilSocket", "failed to create buffer"); return 0; + /*LCOV_EXCL_STOP*/ } u = (struct ::passwd *)malloc(sizeof(struct passwd)); if (!u) { + /*LCOV_EXCL_START*/ DSLOG_WRN("DSUtilSocket", "failed to create password struct"); free(buf); return 0; + /*LCOV_EXCL_STOP*/ } ret = getpwnam_r(name.c_str(), u, buf, bufLen, &uRes); if (uRes == nullptr) { + /*LCOV_EXCL_START*/ if (ret == 0) DSLOG_WRN("DSUtilSocket", "password not found"); else DSLOG_WRN("DSUtilSocket", "errno returned by getpwnam_r is %d", ret); free(buf); free(u); return 0; + /*LCOV_EXCL_STOP*/ } ret = u->pw_uid; free(buf); @@ -201,26 +213,32 @@ int DSUtilSocket::__getgrnam(std::string name) buf = (char *)malloc(bufLen); if (buf == nullptr) { + /*LCOV_EXCL_START*/ DSLOG_WRN("DSUtilSocket", "failed to create buffer"); return 0; + /*LCOV_EXCL_STOP*/ } g = (struct ::group *)malloc(sizeof(struct group)); if (!g) { + /*LCOV_EXCL_START*/ DSLOG_WRN("DSUtilSocket", "failed to create group struct"); free(buf); return 0; + /*LCOV_EXCL_STOP*/ } ret = getgrnam_r(name.c_str(), g, buf, bufLen, &grpRes); if (grpRes == NULL) { + /*LCOV_EXCL_START*/ if (ret == 0) DSLOG_WRN("DSUtilSocket", "Group not found"); else DSLOG_WRN("DSUtilSocket", "errno returned by getpwnam_r is %d", ret); free(buf); free(g); return 0; + /*LCOV_EXCL_STOP*/ } ret = g->gr_gid; -- 2.7.4 From 4a656fc5877758632f206d34eb27517cdcbcfce9 Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Tue, 8 Sep 2020 11:49:05 +0900 Subject: [PATCH 16/16] DSWaylandServer: define LCOV_EXCL blocks for event handling logics from client Change-Id: I9de1b0722e2acdfe3660a7adb68567e5243f5b9b Signed-off-by: Sung-Jin Park --- src/DSWaylandServer/DSWaylandCallback.cpp | 2 ++ src/DSWaylandServer/DSWaylandPointer.cpp | 14 ++------------ src/DSWaylandServer/DSWaylandTextInput.cpp | 2 ++ src/DSWaylandServer/DSWaylandTextInputManagerPrivate.h | 2 ++ src/DSWaylandServer/DSWaylandTizenAppinfo.cpp | 4 ++-- .../DSWaylandTizenInputDeviceManagerPrivate.h | 2 ++ 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/DSWaylandServer/DSWaylandCallback.cpp b/src/DSWaylandServer/DSWaylandCallback.cpp index 3e4ae9a..04a6047 100644 --- a/src/DSWaylandServer/DSWaylandCallback.cpp +++ b/src/DSWaylandServer/DSWaylandCallback.cpp @@ -27,6 +27,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandCallbackPrivate::DSWaylandCallbackPrivate(DSWaylandCallback *p_ptr) : DSObjectPrivate(p_ptr) { @@ -52,5 +53,6 @@ DSWaylandCallback::DSWaylandCallback() DSWaylandCallback::~DSWaylandCallback() { } +/*LCOV_EXCL_STOP*/ } /* namespace display_server */ diff --git a/src/DSWaylandServer/DSWaylandPointer.cpp b/src/DSWaylandServer/DSWaylandPointer.cpp index 3ed7813..e856c64 100644 --- a/src/DSWaylandServer/DSWaylandPointer.cpp +++ b/src/DSWaylandServer/DSWaylandPointer.cpp @@ -51,14 +51,6 @@ void DSWaylandPointerPrivate::setFocus(DSWaylandSurface *waylandSurface) { DSLOG_INF("DSWaylandPointerPrivate", "pointer focus changed (%p -> %p)", __waylandSurface, waylandSurface); -#if 0 - if (__waylandSurface) - { - DSLOG_INF("DSWaylandPointerPrivate", "send leave to %p", __waylandSurface); - send_leave(__wlPointerResource, __waylandSurface->getWlResource()); - } -#endif - __waylandSurface = waylandSurface; if (!waylandSurface || !waylandSurface->hasResource()) @@ -68,6 +60,7 @@ void DSWaylandPointerPrivate::setFocus(DSWaylandSurface *waylandSurface) return; } + /*LCOV_EXCL_START*/ struct ::wl_resource *surface = waylandSurface->getWlResource(); auto client = wl_resource_get_client(surface); @@ -90,10 +83,7 @@ void DSWaylandPointerPrivate::setFocus(DSWaylandSurface *waylandSurface) DSLOG_INF("DSWaylandPointerPrivate", "no wlPointerResource available"); return; } -#if 0 - DSLOG_INF("DSWaylandPointerPrivate", "send enter to %p", __waylandSurface); - sendEnter(__wlPointerResource, __waylandSurface->getWlResource(), surface_x, surface_y); -#endif + /*LCOV_EXCL_STOP*/ } DSWaylandSurface *DSWaylandPointerPrivate::getFocus() diff --git a/src/DSWaylandServer/DSWaylandTextInput.cpp b/src/DSWaylandServer/DSWaylandTextInput.cpp index 820e8ba..d365121 100644 --- a/src/DSWaylandServer/DSWaylandTextInput.cpp +++ b/src/DSWaylandServer/DSWaylandTextInput.cpp @@ -29,6 +29,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ DSWaylandTextInputManagerPrivate::DSWaylandTextInputManagerPrivate(DSWaylandTextInputManager *p_ptr, DSWaylandCompositor *compositor) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr), @@ -1120,5 +1121,6 @@ DSWaylandSurface* DSWaylandTextInput::getClientSurface() return priv->__clientSurface; } +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTextInputManagerPrivate.h b/src/DSWaylandServer/DSWaylandTextInputManagerPrivate.h index dfa815c..fa5d557 100644 --- a/src/DSWaylandServer/DSWaylandTextInputManagerPrivate.h +++ b/src/DSWaylandServer/DSWaylandTextInputManagerPrivate.h @@ -33,6 +33,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DS_DECL_EXPORT DSWaylandTextInputManagerPrivate : public DSObjectPrivate, public DSWaylandServer::wl_text_input_manager { DS_PIMPL_USE_PUBLIC(DSWaylandTextInputManager); @@ -46,6 +47,7 @@ protected: private: DSWaylandCompositor *__compositor; }; +/*LCOV_EXCL_STOP*/ } diff --git a/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp b/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp index 852db56..8bfbd02 100644 --- a/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp +++ b/src/DSWaylandServer/DSWaylandTizenAppinfo.cpp @@ -59,11 +59,11 @@ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_destroy_resource(Resourc { DSLOG_DBG("TizenAppinfoPriv", ""); } +/*LCOV_EXCL_START*/ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_destroy(Resource *resource) { DSLOG_DBG("TizenAppinfoPriv", ""); } -/*LCOV_EXCL_START*/ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_register_pid(Resource *resource, uint32_t pid) { DSLOG_DBG("TizenAppinfoPriv", ""); @@ -76,7 +76,6 @@ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_set_appid(Resource *reso { DSLOG_DBG("TizenAppinfoPriv", ""); } -/*LCOV_EXCL_STOP*/ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_get_base_output_resolution(Resource *resource, uint32_t pid) { @@ -122,6 +121,7 @@ void DSWaylandTizenAppinfoPrivate::tizen_launch_appinfo_ready_metadata(Resource { DSLOG_DBG("TizenAppinfoPriv", ""); } +/*LCOV_EXCL_STOP*/ DSWaylandTizenAppinfo::DSWaylandTizenAppinfo(DSWaylandCompositor *wlCompositor) : DS_INIT_PRIVATE_PTR(DSWaylandTizenAppinfo), diff --git a/src/DSWaylandServer/DSWaylandTizenInputDeviceManagerPrivate.h b/src/DSWaylandServer/DSWaylandTizenInputDeviceManagerPrivate.h index 3850af7..7c5eeb8 100644 --- a/src/DSWaylandServer/DSWaylandTizenInputDeviceManagerPrivate.h +++ b/src/DSWaylandServer/DSWaylandTizenInputDeviceManagerPrivate.h @@ -31,6 +31,7 @@ namespace display_server { +/*LCOV_EXCL_START*/ class DSWaylandTizenInputDeviceManagerPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_input_device_manager { DS_PIMPL_USE_PUBLIC(DSWaylandTizenInputDeviceManager); @@ -61,6 +62,7 @@ protected: private: struct ::wl_display *__display; }; +/*LCOV_EXCL_STOP*/ } -- 2.7.4