add the basic test for DSRefBase 81/241481/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 21 Feb 2020 03:49:41 +0000 (12:49 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:43:23 +0000 (18:43 +0900)
Change-Id: I7f8c2c17255041afb0e585c96974979839901438

tests/DSRefBase-test.cpp [new file with mode: 0644]
tests/meson.build

diff --git a/tests/DSRefBase-test.cpp b/tests/DSRefBase-test.cpp
new file mode 100644 (file)
index 0000000..57ab821
--- /dev/null
@@ -0,0 +1,21 @@
+#include "libds-tests.h"
+#include "DSRefBase.h"
+
+class DSRefBaseTest : public ::testing::Test
+{
+public:
+       void SetUp(void) override {
+               std::cout << "setup\n";
+       }
+       void TearDown(void) override {
+               std::cout << "teardown\n";
+       }
+};
+
+TEST_F(DSRefBaseTest, CreateRefBase)
+{
+       display_server::DSRefBase* refBase = new display_server::DSRefBase();
+
+       int count = refBase->getref();
+       ASSERT_TRUE(count == 1);
+}
\ No newline at end of file
index a52e78a..663d13e 100644 (file)
@@ -1,5 +1,6 @@
 incdir = include_directories('../src/lib')
-libds_unittests_src = ['libds-tests.cpp']
+libds_unittests_src = ['libds-tests.cpp',
+                                          'DSRefBase-test.cpp']
 
 gmock_dep = dependency('gmock', method : 'pkg-config')