Fix notification-ex unittest build error 51/199551/1
authorSukHyung, Kang <shine.kang@samsung.com>
Wed, 13 Feb 2019 03:10:02 +0000 (12:10 +0900)
committerSukHyung, Kang <shine.kang@samsung.com>
Wed, 13 Feb 2019 03:10:02 +0000 (12:10 +0900)
Change-Id: I04d12087e44064d3b18c323bc82021a10cc17a2c
Signed-off-by: SukHyung, Kang <shine.kang@samsung.com>
packaging/notification.spec
unittest/CMakeLists.txt
unittest/src/test_item.cc [new file with mode: 0644]

index cf8fc5a..6376440 100644 (file)
@@ -144,14 +144,14 @@ Header & package configuration files to support development of the notification.
 
 
 #################################################
-# notification_ex_unittests
+# notification-ex_unittests
 #################################################
-%package -n notification_ex_unittests
-Summary:    GTest for notification_ex
+%package -n notification-ex_unittests
+Summary:    GTest for notification-ex
 Group:      Development/Libraries
 
-%description -n notification_ex_unittests
-GTest for notification_ex
+%description -n notification-ex_unittests
+GTest for notification-ex
 
-%files -n notification_ex_unittests
-%{_bindir}/notification_ex_unittests
+%files -n notification-ex_unittests
+%{_bindir}/notification-ex_unittests
index 129c1ef..6fdede0 100644 (file)
@@ -1,13 +1,14 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(notification_ex_unittests CXX)
+PROJECT(notification-ex_unittests CXX)
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(notification_ex_unittests REQUIRED
+pkg_check_modules(notification-ex_unittests REQUIRED
     dlog
     gmock
+    capi-appfw-app-control
 )
 
-FOREACH(flag ${notification_ex_unittests_CFLAGS})
+FOREACH(flag ${notification-ex_unittests_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline")
@@ -16,12 +17,15 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++11")
 SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
 
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../notification-ex)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../)
+
 AUX_SOURCE_DIRECTORY(src SOURCES)
 ADD_EXECUTABLE(${PROJECT_NAME}
     ${SOURCES}
 )
 
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${watchface-complication_unittests_LDFLAGS}
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${notification-ex_unittests_LDFLAGS}
     ${pkgs_LDFLAGS}
     ${pkgs_LIBRARIES}
     gmock
diff --git a/unittest/src/test_item.cc b/unittest/src/test_item.cc
new file mode 100644 (file)
index 0000000..adb1c11
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <gtest/gtest.h>
+#include <gmock/gmock.h>
+
+#include "notification-ex/item.h"
+
+class ENTRY_ITEM : public ::testing::Test {
+ public:
+  virtual void SetUp() {
+  }
+  virtual void TearDown() {
+  }
+};
\ No newline at end of file