implement the skeleton methods of DSOutput 37/241537/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 18 Jun 2020 02:25:19 +0000 (11:25 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:44:52 +0000 (18:44 +0900)
At this time, the test case fails.

Change-Id: I4104111532b51f01e92849d51ee57fdac5e0631a

src/DSOutput/DSOutput.cpp
src/DSOutput/DSOutput.h
tests/DSOutput-test.cpp

index db3e5bd..c9a18e7 100644 (file)
@@ -2,7 +2,9 @@
 
 namespace display_server
 {
-DSOutput::DSOutput() : resolutionWidth(1280), resolutionHeight(720)
+DSOutput::DSOutput()
+       : __resolutionWidth(0),
+         __resolutionHeight(0)
 {}
 
 DSOutput::~DSOutput()
@@ -10,11 +12,17 @@ DSOutput::~DSOutput()
 
 int DSOutput::getResolutionWidth()
 {
-       return resolutionWidth;
+       return __resolutionWidth;
 }
 
 int DSOutput::getResolutionHeight()
 {
-       return resolutionHeight;
+       return __resolutionHeight;
 }
+
+bool DSOutput::applyResolutionAuto()
+{
+       return false;
+}
+
 } // namespace display_server
index 0227a9a..47d279d 100644 (file)
@@ -3,18 +3,22 @@
 
 namespace display_server
 {
+
 class DSOutput
 {
 public:
        DSOutput();
        virtual ~DSOutput();
+
        int getResolutionWidth();
        int getResolutionHeight();
+       bool applyResolutionAuto();
 
 private:
-       int resolutionWidth;
-       int resolutionHeight;
+       int __resolutionWidth;
+       int __resolutionHeight;
 };
+
 }
 
 #endif
index 9c610e8..5b8b046 100644 (file)
@@ -19,14 +19,11 @@ TEST_F(DSOutputTest, NewDSOutput)
        ASSERT_TRUE(true);
 }
 
-TEST_F(DSOutputTest, GetResolutionWidthHeight)
+TEST_F(DSOutputTest, BasicMethods)
 {
-       DSOutput *output = new DSOutput;
-
-       int width = output->getResolutionWidth();
-       EXPECT_TRUE(width == 1280);
-       int height = output->getResolutionHeight();
-       EXPECT_TRUE(height == 720);
+       DSOutput output;
 
-       delete output;
+       EXPECT_TRUE(output.getResolutionWidth() != 0);
+       EXPECT_TRUE(output.getResolutionHeight() != 0);
+       EXPECT_TRUE(output.applyResolutionAuto() == true);
 }