From: SooChan Lim Date: Thu, 18 Jun 2020 01:35:35 +0000 (+0900) Subject: implement the skeleton methods of DSPolicyArea X-Git-Tag: accepted/tizen/unified/20200820.213435~337 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F38%2F241538%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git implement the skeleton methods of DSPolicyArea At this time, the test case fails. Change-Id: I843c7a5c0cf9fd5a5de7cfc41919af7902ce8e78 --- diff --git a/src/DSPolicyArea/DSPolicyArea.cpp b/src/DSPolicyArea/DSPolicyArea.cpp index 9ed13e4..d9d1241 100644 --- a/src/DSPolicyArea/DSPolicyArea.cpp +++ b/src/DSPolicyArea/DSPolicyArea.cpp @@ -3,8 +3,29 @@ namespace display_server { DSPolicyArea::DSPolicyArea() + : __x(0), + __y(0), + __width(0), + __height(0), + __seat(nullptr) {} DSPolicyArea::~DSPolicyArea() {} + +bool DSPolicyArea::setPosition(int x, int y) +{ + return false; +} + +bool DSPolicyArea::setSize(int width, int height) +{ + return false; +} + +bool DSPolicyArea::attachSeat(DSSeat *seat) +{ + return false; +} + } // namespace display_server \ No newline at end of file diff --git a/src/DSPolicyArea/DSPolicyArea.h b/src/DSPolicyArea/DSPolicyArea.h index aeaa130..9264548 100644 --- a/src/DSPolicyArea/DSPolicyArea.h +++ b/src/DSPolicyArea/DSPolicyArea.h @@ -1,6 +1,8 @@ #ifndef _DSPOLICYAREA_H_ #define _DSPOLICYAREA_H_ +#include + namespace display_server { class DSPolicyArea @@ -9,8 +11,14 @@ public: DSPolicyArea(); virtual ~DSPolicyArea(); + bool setPosition(int x, int y); + bool setSize(int width, int height); + bool attachSeat(DSSeat *seat); + private: - /* data */ + int __x, __y; + int __width, __height; + DSSeat *__seat; }; } diff --git a/tests/DSPolicyArea-test.cpp b/tests/DSPolicyArea-test.cpp index a1a20e5..ed4e1a4 100644 --- a/tests/DSPolicyArea-test.cpp +++ b/tests/DSPolicyArea-test.cpp @@ -18,3 +18,13 @@ TEST_F(DSPolicyAreaTest, NewDSPolicyArea) delete policyArea; ASSERT_TRUE(true); } + +TEST_F(DSPolicyAreaTest, BasicMethods) +{ + DSPolicyArea policyArea; + DSSeat seat; + + EXPECT_TRUE(policyArea.setPosition(10, 10) == true); + EXPECT_TRUE(policyArea.setSize(100, 100) == true); + EXPECT_TRUE(policyArea.attachSeat(&seat) == true); +} \ No newline at end of file