diff options
author | Inkyun Kil <inkyun.kil@samsung.com> | 2021-05-07 11:58:24 +0900 |
---|---|---|
committer | jusung <jusung07.son@samsung.com> | 2021-05-07 13:22:48 +0900 |
commit | 60a8b6835f26c8184324b86175e7fe2c2b7feab0 (patch) | |
tree | a933b4474cd889d7cfb5412fc69ad1cf7065394a | |
parent | 9858c4f20acb49cd29b92275094926c8dc6759f7 (diff) | |
download | alarm-manager-60a8b6835f26c8184324b86175e7fe2c2b7feab0.tar.gz alarm-manager-60a8b6835f26c8184324b86175e7fe2c2b7feab0.tar.bz2 alarm-manager-60a8b6835f26c8184324b86175e7fe2c2b7feab0.zip |
Fix build gcov issue
Change-Id: I35fe62a9a0810c247ead58b3d86db6c36b89fd20
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
Signed-off-by: jusung <jusung07.son@samsung.com>
-rw-r--r-- | mock/mock.cc | 2 | ||||
-rw-r--r-- | mock/pkgmgr_info_fake.h | 2 | ||||
-rw-r--r-- | unittest/alarm_manager_unittest.cpp | 11 |
3 files changed, 14 insertions, 1 deletions
diff --git a/mock/mock.cc b/mock/mock.cc index eea387c..0a3fba7 100644 --- a/mock/mock.cc +++ b/mock/mock.cc @@ -95,3 +95,5 @@ DEFINE_FAKE_VALUE_FUNC(int, pkgmgrinfo_appinfo_get_component_type, pkgmgrinfo_appinfo_h, char **); DEFINE_FAKE_VALUE_FUNC(int, pkgmgrinfo_appinfo_destroy_appinfo, pkgmgrinfo_appinfo_h); +DEFINE_FAKE_VALUE_FUNC(int, pkgmgrinfo_appinfo_get_pkgid, pkgmgrinfo_pkginfo_h, + char **); diff --git a/mock/pkgmgr_info_fake.h b/mock/pkgmgr_info_fake.h index 4b739dd..32558f0 100644 --- a/mock/pkgmgr_info_fake.h +++ b/mock/pkgmgr_info_fake.h @@ -31,6 +31,8 @@ DECLARE_FAKE_VALUE_FUNC(int, pkgmgrinfo_pkginfo_destroy_pkginfo, pkgmgrinfo_pkginfo_h); DECLARE_FAKE_VALUE_FUNC(int, pkgmgrinfo_appinfo_get_usr_appinfo, const char *, uid_t, pkgmgrinfo_appinfo_h*); +DECLARE_FAKE_VALUE_FUNC(int, pkgmgrinfo_appinfo_get_pkgid, pkgmgrinfo_pkginfo_h, + char **); DECLARE_FAKE_VALUE_FUNC(int, pkgmgrinfo_appinfo_get_component_type, pkgmgrinfo_appinfo_h, char **); DECLARE_FAKE_VALUE_FUNC(int, pkgmgrinfo_appinfo_destroy_appinfo, diff --git a/unittest/alarm_manager_unittest.cpp b/unittest/alarm_manager_unittest.cpp index ded47c2..2a01cb1 100644 --- a/unittest/alarm_manager_unittest.cpp +++ b/unittest/alarm_manager_unittest.cpp @@ -139,6 +139,12 @@ static int __pkgmgrinfo_appinfo_get_usr_appinfo_fake(const char *pkgid, uid_t ui return 0; } +static int __pkgmgrinfo_appinfo_get_pkgid(pkgmgrinfo_appinfo_h handle, char **pkgid) +{ + *pkgid = "org.tizen.alarm_unitest"; + return 0; +} + static int __pkgmgrinfo_appinfo_get_component_type_fake(pkgmgrinfo_appinfo_h handle, char **type) { return 0; @@ -207,6 +213,9 @@ TEST_F(AlarmServerTest, alarm_manager_alarm_create_appsvc_p) pkgmgrinfo_pkginfo_get_api_version_fake.custom_fake = __pkgmgrinfo_pkginfo_get_api_version_fake; + pkgmgrinfo_appinfo_get_pkgid_fake.custom_fake = + __pkgmgrinfo_appinfo_get_pkgid; + pkgmgrinfo_appinfo_get_usr_appinfo_fake.custom_fake = __pkgmgrinfo_appinfo_get_usr_appinfo_fake; @@ -256,7 +265,7 @@ TEST_F(AlarmServerTest, alarm_manager_alarm_create_noti_p) param = g_variant_new("(iiiiiiiiiixiixs)", 2019, 11, 1, 12, 59, 59, 2020, 12, 29, 3, - 0, reserved, 1, 0, reserved, + reserved, 1, 0, reserved, "bundle"); |