Fix build break 29/218229/3
authormk5004.lee <mk5004.lee@samsung.com>
Wed, 20 Nov 2019 11:20:14 +0000 (20:20 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Thu, 21 Nov 2019 00:21:09 +0000 (09:21 +0900)
- one definition rule violation
  inlining failed issue

Change-Id: Id9e73333133d6a83391b71d21aab53cd02f13037
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
notification-ex/CMakeLists.txt
unittest/CMakeLists.txt
unittest/mock/gio_mock.h
unittest/mock/mock.cc
unittest/mock/tzplatform_config_mock.h
unittest/src/test_shared_file.cc

index bf61938..6464cf4 100644 (file)
@@ -28,9 +28,9 @@ pkg_check_modules(notification-ex REQUIRED
 FOREACH(flag ${notification-ex_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline -std=c++11")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror")
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
+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")
 
index ea7eba3..6413974 100644 (file)
@@ -15,7 +15,7 @@ pkg_check_modules(notification-ex_unittests REQUIRED
 FOREACH(flag ${notification-ex_unittests_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror")
 
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -std=c++11")
 SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
index 936ec9e..ea0a33d 100644 (file)
@@ -47,8 +47,6 @@ typedef void (*GFileProgressCallback) (goffset current_num_bytes,
 
 DECLARE_FAKE_VALUE_FUNC(GFile*, g_file_new_for_path, const char*);
 DECLARE_FAKE_VALUE_FUNC(gboolean, g_file_query_exists, GFile*, GCancellable*);
-DECLARE_FAKE_VALUE_FUNC(gboolean, g_file_copy, GFile*, GFile*, GFileCopyFlags,
-    GCancellable*, GFileProgressCallback, gpointer, GError**);
 DECLARE_FAKE_VALUE_FUNC(gboolean, g_file_make_directory, GFile*, GCancellable*,
     GError**);
 DECLARE_FAKE_VALUE_FUNC(int, access, const char*, int);
index 4ccd8ae..4aefb58 100644 (file)
@@ -30,8 +30,6 @@ DEFINE_FAKE_VALUE_FUNC(int, app_get_name, char**);
 /* gio */
 DEFINE_FAKE_VALUE_FUNC(GFile*, g_file_new_for_path, const char*);
 DEFINE_FAKE_VALUE_FUNC(gboolean, g_file_query_exists, GFile*, GCancellable*);
-DEFINE_FAKE_VALUE_FUNC(gboolean, g_file_copy, GFile*, GFile*, GFileCopyFlags,
-    GCancellable*, GFileProgressCallback, gpointer, GError**);
 DEFINE_FAKE_VALUE_FUNC(gboolean, g_file_make_directory, GFile*, GCancellable*,
     GError**);
 DEFINE_FAKE_VALUE_FUNC(int, access, const char*, int);
@@ -41,7 +39,7 @@ DEFINE_FAKE_VALUE_FUNC(ssize_t, smack_new_label_from_path, const char*,
     const char*, int, char**);
 
 /* tzplatform */
-DEFINE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, enum tzplatform_variable);
+DEFINE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, tzplatform_variable_e);
 
 /* security-manager */
 DEFINE_FAKE_VALUE_FUNC(int, security_manager_private_sharing_req_new,
index a24c49a..f21894e 100644 (file)
 extern "C" {
 #endif
 
-enum tzplatform_variable {
+typedef enum {
        USER = 0,
        SYSTEM = 1,
-};
+}tzplatform_variable_e;
 
-DECLARE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, enum tzplatform_variable);
+DECLARE_FAKE_VALUE_FUNC(const char*, tzplatform_getenv, tzplatform_variable_e);
 
 #ifdef __cplusplus
 }
index 582d322..761fb03 100644 (file)
@@ -48,12 +48,6 @@ gboolean __fake_g_file_make_directory(GFile* file, GCancellable* cancellable,
   return true;
 }
 
-gboolean __fake_g_file_copy(GFile* source, GFile* dest, GFileCopyFlags flags,
-    GCancellable* cancellable, GFileProgressCallback callback,
-    gpointer data, GError** error) {
-  return false;
-}
-
 int __fake_access(const char* path, int mode) {
   return 0;
 }
@@ -66,7 +60,7 @@ ssize_t __fake_smack_new_label_from_path(const char* path, const char* xattr,
 }
 
 // tzplatform
-const char* __fake_tzplatform_getenv(enum tzplatform_variable id) {
+const char* __fake_tzplatform_getenv(tzplatform_variable_e id) {
   return "/opt/usr/home/owner/apps_rw";
 }
 
@@ -107,7 +101,6 @@ class SharedFileTest  : public ::testing::Test {
     g_file_new_for_path_fake.custom_fake = __fake_g_file_new_for_path;
     g_file_query_exists_fake.custom_fake = __fake_g_file_query_exists;
     g_file_make_directory_fake.custom_fake = __fake_g_file_make_directory;
-    g_file_copy_fake.custom_fake = __fake_g_file_copy;
     access_fake.custom_fake = __fake_access;
     security_manager_private_sharing_req_new_fake.custom_fake =
       __fake_security_manager_private_sharing_req_new;