From e52f1975800ecf6553312de6ec6d1438b8536d2b Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Mon, 8 Jun 2020 18:40:16 +0900 Subject: [PATCH] DSCanvas: add initial code for DSCanvas add initial DSCanvas class and testcase for it. Change-Id: Id99ad0553f0541190554b8b32d0d9fb8d79ed784 --- meson.build | 1 + src/lib/DSCanvas/DSCanvas.cpp | 12 ++++++++++++ src/lib/DSCanvas/DSCanvas.h | 17 +++++++++++++++++ tests/DSCanvas-test.cpp | 18 ++++++++++++++++++ tests/meson.build | 2 ++ 5 files changed, 50 insertions(+) create mode 100644 src/lib/DSCanvas/DSCanvas.cpp create mode 100644 src/lib/DSCanvas/DSCanvas.h create mode 100644 tests/DSCanvas-test.cpp diff --git a/meson.build b/meson.build index 73d54af..8e08864 100644 --- a/meson.build +++ b/meson.build @@ -49,6 +49,7 @@ src_libds = [ 'src/lib/DSCompositor/DSCompositor.cpp', 'src/lib/DSOutput/DSOutput.cpp', 'src/lib/DSInput/DSInput.cpp', + 'src/lib/DSCanvas/DSCanvas.cpp', ] pkgconfig = import('pkgconfig') diff --git a/src/lib/DSCanvas/DSCanvas.cpp b/src/lib/DSCanvas/DSCanvas.cpp new file mode 100644 index 0000000..ad02a95 --- /dev/null +++ b/src/lib/DSCanvas/DSCanvas.cpp @@ -0,0 +1,12 @@ +#include "DSCanvas.h" + +namespace display_server +{ + DSCanvas::DSCanvas() + { + } + + DSCanvas::~DSCanvas() + { + } +} // namespace display_server \ No newline at end of file diff --git a/src/lib/DSCanvas/DSCanvas.h b/src/lib/DSCanvas/DSCanvas.h new file mode 100644 index 0000000..f0e69aa --- /dev/null +++ b/src/lib/DSCanvas/DSCanvas.h @@ -0,0 +1,17 @@ +#ifndef _DSCANVAS_H_ +#define _DSCANVAS_H_ + +namespace display_server +{ + class DSCanvas + { + public: + DSCanvas(); + virtual ~DSCanvas(); + + private: + /* data */ + }; +} + +#endif \ No newline at end of file diff --git a/tests/DSCanvas-test.cpp b/tests/DSCanvas-test.cpp new file mode 100644 index 0000000..ac1f5ed --- /dev/null +++ b/tests/DSCanvas-test.cpp @@ -0,0 +1,18 @@ +#include "libds-tests.h" +#include "DSCanvas.h" + +using namespace display_server; + +class DSCanvasTest : public ::testing::Test +{ +public: + void SetUp(void) override {} + void TearDown(void) override {} +}; + +TEST_F(DSCanvasTest, NewDSCanvas) +{ + DSCanvas *canvas = new DSCanvas; + delete canvas; + ASSERT_TRUE(true); +} diff --git a/tests/meson.build b/tests/meson.build index 0ede0e7..00c4b33 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -5,6 +5,7 @@ incdir = include_directories( '../src/lib/DSCompositor', '../src/lib/DSOutput', '../src/lib/DSInput', + '../src/lib/DSCanvas', ) libds_unittests_src = [ @@ -17,6 +18,7 @@ libds_unittests_src = [ 'DSCompositor-test.cpp', 'DSOutput-test.cpp', 'DSInput-test.cpp', + 'DSCanvas-test.cpp', ] gmock_dep = dependency('gmock', method : 'pkg-config') -- 2.7.4