aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
-rw-r--r--tests/CMakeLists.txt21
-rw-r--r--tests/name-watch-test.cc21
3 files changed, 47 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 837d9ec..ecd2f12 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,5 +68,10 @@ add_subdirectory(data)
add_subdirectory(src)
enable_testing()
+
+set (GTEST_SOURCE_DIR /usr/src/gtest/src)
+set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
+set (GTEST_LIBS -lpthread)
+
add_subdirectory(tests)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e69de29..1e5448d 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,21 @@
+
+###########################
+# Google Test
+###########################
+
+include_directories(${GTEST_INCLUDE_DIR})
+
+add_library (gtest STATIC
+ ${GTEST_SOURCE_DIR}/gtest-all.cc
+ ${GTEST_SOURCE_DIR}/gtest_main.cc)
+target_link_libraries(gtest ${GTEST_LIBS})
+
+
+###########################
+# Name Watch Test
+###########################
+
+add_executable (name-watch-test name-watch-test.cc)
+target_link_libraries (name-watch-test gtest ${GIO2_LIBRARIES})
+add_test(name-watch-test name-watch-test)
+
diff --git a/tests/name-watch-test.cc b/tests/name-watch-test.cc
new file mode 100644
index 0000000..b5a1db3
--- /dev/null
+++ b/tests/name-watch-test.cc
@@ -0,0 +1,21 @@
+
+#include <gio/gio.h>
+#include <gtest/gtest.h>
+
+class NameWatchTest : public ::testing::Test
+{
+ protected:
+ virtual void SetUp() {
+
+ }
+
+ virtual void TearDown() {
+
+ }
+};
+
+TEST_F(NameWatchTest, DummyTest)
+{
+
+
+}