From 0929d015eceba8e87b45aaeca2ee64b35e1477e0 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 18 Jun 2020 11:32:29 +0900 Subject: [PATCH] implement the skeleton methods of DSSeat At this time, the test case fails. Change-Id: Ib8b2c7a47168be836e5ab5db67ff0ce99e068599 --- src/DSSeat/DSSeat.cpp | 13 +++++++++++++ src/DSSeat/DSSeat.h | 9 ++++++++- tests/DSInput-test.cpp | 7 +++++++ tests/DSSeat-test.cpp | 9 +++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/DSSeat/DSSeat.cpp b/src/DSSeat/DSSeat.cpp index 559e703..ba66418 100644 --- a/src/DSSeat/DSSeat.cpp +++ b/src/DSSeat/DSSeat.cpp @@ -2,9 +2,22 @@ namespace display_server { + DSSeat::DSSeat() + : __input(nullptr) {} DSSeat::~DSSeat() {} + +bool DSSeat::addInput(DSInput *input) +{ + return false; +} + +bool DSSeat::removeInput(DSInput *input) +{ + return false; +} + } // namespace display_server \ No newline at end of file diff --git a/src/DSSeat/DSSeat.h b/src/DSSeat/DSSeat.h index c3e64ab..78f06b4 100644 --- a/src/DSSeat/DSSeat.h +++ b/src/DSSeat/DSSeat.h @@ -1,17 +1,24 @@ #ifndef _DSSEAT_H_ #define _DSSEAT_H_ +#include + namespace display_server { + class DSSeat { public: DSSeat(); virtual ~DSSeat(); + bool addInput(DSInput *input); + bool removeInput(DSInput *input); + private: - /* data */ + DSInput *__input; }; + } #endif \ No newline at end of file diff --git a/tests/DSInput-test.cpp b/tests/DSInput-test.cpp index 657803c..3e4f18c 100644 --- a/tests/DSInput-test.cpp +++ b/tests/DSInput-test.cpp @@ -18,3 +18,10 @@ TEST_F(DSInputTest, NewDSInput) delete input; ASSERT_TRUE(true); } + +TEST_F(DSInputTest, BasicMethods) +{ + DSInput input; + + EXPECT_TRUE(true); +} diff --git a/tests/DSSeat-test.cpp b/tests/DSSeat-test.cpp index 72c53d9..40128cd 100644 --- a/tests/DSSeat-test.cpp +++ b/tests/DSSeat-test.cpp @@ -18,3 +18,12 @@ TEST_F(DSSeatTest, NewDSSeat) delete seat; ASSERT_TRUE(true); } + +TEST_F(DSSeatTest, BasicMethods) +{ + DSSeat seat; + DSInput input; + + EXPECT_TRUE(seat.addInput(&input) == true); + EXPECT_TRUE(seat.removeInput(&input) == true); +} -- 2.7.4