From: Changgyu Choi Date: Thu, 11 Aug 2022 06:15:41 +0000 (+0900) Subject: Fix coding style X-Git-Tag: accepted/tizen/unified/20220817.153847~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F279536%2F2;p=platform%2Fcore%2Fappfw%2Faul-1.git Fix coding style Changes: - Adds missing headers. - Fix wrong indents. - Adds explicit keyword. Change-Id: I432ace3e6af683d5546fe41ce88e37e422bbc9a5 Signed-off-by: Changgyu Choi --- diff --git a/aul/api/aul_app_context.cc b/aul/api/aul_app_context.cc index 6238865..d0134af 100644 --- a/aul/api/aul_app_context.cc +++ b/aul/api/aul_app_context.cc @@ -19,6 +19,8 @@ #include #include +#include + #include "aul/api/aul_app_context.h" #include "aul/app_manager/app_manager.hh" #include "aul/common/api.hh" diff --git a/aul/api/aul_app_event.cc b/aul/api/aul_app_event.cc index b93af89..9ff717f 100644 --- a/aul/api/aul_app_event.cc +++ b/aul/api/aul_app_event.cc @@ -18,6 +18,9 @@ #include +#include +#include + #include "aul/app_manager/app_event.hh" #include "aul/common/api.hh" #include "aul/common/exception.hh" diff --git a/aul/api/aul_app_lifecycle.cc b/aul/api/aul_app_lifecycle.cc index dadb376..6566e6c 100644 --- a/aul/api/aul_app_lifecycle.cc +++ b/aul/api/aul_app_lifecycle.cc @@ -16,6 +16,9 @@ #include +#include +#include + #include "aul/api/aul_app_lifecycle.h" #include "aul/common/api.hh" #include "aul/common/exception.hh" @@ -106,7 +109,7 @@ extern "C" API int aul_app_lifecycle_register_state_changed_cb( } extern "C" API int aul_app_lifecycle_deregister_state_changed_cb(void) { - return listener.Deregister(); + return listener.Deregister(); } extern "C" API int aul_app_lifecycle_update_state( diff --git a/aul/app_manager/app_context.hh b/aul/app_manager/app_context.hh index d997b37..4ef30f2 100644 --- a/aul/app_manager/app_context.hh +++ b/aul/app_manager/app_context.hh @@ -46,7 +46,7 @@ class AppContext { bool is_sub_app_; }; - AppContext(tizen_base::Bundle b); + explicit AppContext(tizen_base::Bundle b); virtual ~AppContext(); const std::string& GetAppId() const; diff --git a/aul/app_manager/app_event.hh b/aul/app_manager/app_event.hh index 4cd6b10..84e87a2 100644 --- a/aul/app_manager/app_event.hh +++ b/aul/app_manager/app_event.hh @@ -34,7 +34,7 @@ class AppEvent { }; AppEvent(std::string app_id, IEvent* ev); - AppEvent(IEvent* ev); + explicit AppEvent(IEvent* ev); virtual ~AppEvent(); private: diff --git a/aul/common/file_descriptor.hh b/aul/common/file_descriptor.hh index 80f9fd5..693aad2 100644 --- a/aul/common/file_descriptor.hh +++ b/aul/common/file_descriptor.hh @@ -24,7 +24,7 @@ namespace aul { class FileDescriptor { public: - FileDescriptor(int fd = -1) : fd_(fd) {} + explicit FileDescriptor(int fd = -1) : fd_(fd) {} virtual ~FileDescriptor() { if (fd_ > -1) diff --git a/aul/component/component_port.hh b/aul/component/component_port.hh index 44903f2..7de6d0b 100644 --- a/aul/component/component_port.hh +++ b/aul/component/component_port.hh @@ -23,7 +23,7 @@ namespace aul { class ComponentPort { public: - ComponentPort(std::string name); + explicit ComponentPort(std::string name); virtual ~ComponentPort(); bool Exist(); diff --git a/aul/socket/client.hh b/aul/socket/client.hh index ca6a5cf..ba50a91 100644 --- a/aul/socket/client.hh +++ b/aul/socket/client.hh @@ -24,7 +24,7 @@ namespace aul { class Client : public Socket { public: - Client(std::string path, int timeout_msec = 5000); + explicit Client(std::string path, int timeout_msec = 5000); int Send(const Packet& packet); int Recv(Packet** packet); }; diff --git a/aul/socket/packet.cc b/aul/socket/packet.cc index 4ff8507..d291274 100644 --- a/aul/socket/packet.cc +++ b/aul/socket/packet.cc @@ -88,7 +88,7 @@ void Packet::ReadFromParcel(tizen_base::Parcel* parcel) { parcel->ReadInt32(&size); parcel->ReadInt32(&opt_); if (size > 0) { - auto* data = new (std::nothrow) unsigned char [size]; + auto* data = new (std::nothrow) unsigned char[size]; if (data == nullptr) return; diff --git a/aul/socket/socket.hh b/aul/socket/socket.hh index 928ad9f..95e08c8 100644 --- a/aul/socket/socket.hh +++ b/aul/socket/socket.hh @@ -31,8 +31,8 @@ static const int MAX_AUL_BUFF_SIZE = 131071; class Socket { public: - Socket(std::string path); - Socket(int fd); + explicit Socket(std::string path); + explicit Socket(int fd); virtual ~Socket(); int Send(const void* buf, unsigned int len); diff --git a/parser/boot-sequencer/app_info.hh b/parser/boot-sequencer/app_info.hh index d9de0f3..dae8c1a 100644 --- a/parser/boot-sequencer/app_info.hh +++ b/parser/boot-sequencer/app_info.hh @@ -23,7 +23,7 @@ namespace boot_sequencer { class AppInfo { public: - AppInfo(std::string appid); + explicit AppInfo(std::string appid); const std::string& GetAppId() const; const std::string& GetAfter() const; diff --git a/parser/boot-sequencer/appsvc_db.hh b/parser/boot-sequencer/appsvc_db.hh index 4aedad6..f63d98d 100644 --- a/parser/boot-sequencer/appsvc_db.hh +++ b/parser/boot-sequencer/appsvc_db.hh @@ -30,7 +30,7 @@ namespace boot_sequencer { class AppSvcDB : public Database { public: - AppSvcDB(uid_t uid); + explicit AppSvcDB(uid_t uid); virtual ~AppSvcDB(); std::vector> Select(const std::string& package); diff --git a/parser/boot-sequencer/database.hh b/parser/boot-sequencer/database.hh index 8e0b9ed..14a4f32 100644 --- a/parser/boot-sequencer/database.hh +++ b/parser/boot-sequencer/database.hh @@ -50,7 +50,7 @@ class Database { bool done_ = false; }; - Database(std::string path); + explicit Database(std::string path); virtual ~Database(); void Open(); diff --git a/parser/metadata/alias-appid/appsvc_db.hh b/parser/metadata/alias-appid/appsvc_db.hh index 04190de..abc6933 100644 --- a/parser/metadata/alias-appid/appsvc_db.hh +++ b/parser/metadata/alias-appid/appsvc_db.hh @@ -30,7 +30,7 @@ namespace plugin { class AppSvcDB : public Database { public: - AppSvcDB(uid_t uid); + explicit AppSvcDB(uid_t uid); virtual ~AppSvcDB(); std::vector> Select(const std::string& appid); diff --git a/parser/metadata/alias-appid/pkgmgr_interface.cc b/parser/metadata/alias-appid/pkgmgr_interface.cc index edb4faa..bb414cc 100644 --- a/parser/metadata/alias-appid/pkgmgr_interface.cc +++ b/parser/metadata/alias-appid/pkgmgr_interface.cc @@ -25,8 +25,7 @@ using namespace plugin; extern "C" API int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Install, list); @@ -35,8 +34,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNINSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Uninstall, list); @@ -45,8 +43,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNINSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Upgrade, list); @@ -55,8 +52,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERINSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Uninstall, list); @@ -65,8 +61,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERINSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUNINSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Uninstall, list); @@ -75,8 +70,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUNINSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUPGRADE(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Upgrade, list); @@ -85,24 +79,21 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUPGRADE(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_CLEAN(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().Clean(); return 0; } extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNDO(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().Undo(); return 0; } extern "C" API int PKGMGR_MDPARSER_PLUGIN_REMOVED(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid); return 0; } diff --git a/parser/metadata/allowed-appid/appsvc_db.hh b/parser/metadata/allowed-appid/appsvc_db.hh index a66f6be..3cc0cd0 100644 --- a/parser/metadata/allowed-appid/appsvc_db.hh +++ b/parser/metadata/allowed-appid/appsvc_db.hh @@ -30,7 +30,7 @@ namespace plugin { class AppSvcDB : public Database { public: - AppSvcDB(uid_t uid); + explicit AppSvcDB(uid_t uid); virtual ~AppSvcDB(); std::vector> Select(const std::string& appid); diff --git a/parser/metadata/allowed-appid/pkgmgr_interface.cc b/parser/metadata/allowed-appid/pkgmgr_interface.cc index 3c16f90..2c6bfb9 100644 --- a/parser/metadata/allowed-appid/pkgmgr_interface.cc +++ b/parser/metadata/allowed-appid/pkgmgr_interface.cc @@ -25,8 +25,7 @@ using namespace plugin; extern "C" API int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Install, list); @@ -35,8 +34,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNINSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Uninstall, list); @@ -45,8 +43,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNINSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Upgrade, list); @@ -55,8 +52,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERINSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Uninstall, list); @@ -65,8 +61,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERINSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUNINSTALL(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Uninstall, list); @@ -75,8 +70,7 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUNINSTALL(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUPGRADE(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().AddAppEventArgs(pkgid, appid, EventType::Upgrade, list); @@ -85,24 +79,21 @@ extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUPGRADE(const char* pkgid, } extern "C" API int PKGMGR_MDPARSER_PLUGIN_CLEAN(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().Clean(); return 0; } extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNDO(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); PluginManager::GetInst().Undo(); return 0; } extern "C" API int PKGMGR_MDPARSER_PLUGIN_REMOVED(const char* pkgid, - const char* appid, GList* list) -{ + const char* appid, GList* list) { _W("[__ALLOWED_APPID__] pkgid(%s), appid(%s)", pkgid, appid); return 0; } diff --git a/parser/metadata/common/database.hh b/parser/metadata/common/database.hh index 37302a0..89326af 100644 --- a/parser/metadata/common/database.hh +++ b/parser/metadata/common/database.hh @@ -54,7 +54,7 @@ namespace plugin { class Database { public: - Database(std::string path); + explicit Database(std::string path); virtual ~Database(); void Open(); diff --git a/parser/metadata/common/metadata_plugin.hh b/parser/metadata/common/metadata_plugin.hh index 2416f69..525992d 100644 --- a/parser/metadata/common/metadata_plugin.hh +++ b/parser/metadata/common/metadata_plugin.hh @@ -31,7 +31,7 @@ namespace plugin { class MetadataPlugin { public: - MetadataPlugin(std::unique_ptr db) : db_(std::move(db)) { } + explicit MetadataPlugin(std::unique_ptr db) : db_(std::move(db)) { } virtual ~MetadataPlugin() = default; void AddAppEventArgs(const std::string& pkgid, const std::string& appid, diff --git a/server/boot_sequence.hh b/server/boot_sequence.hh index 550f98d..6f8c37c 100644 --- a/server/boot_sequence.hh +++ b/server/boot_sequence.hh @@ -23,7 +23,7 @@ namespace aul { class BootSequence { public: - BootSequence(std::string appid); + explicit BootSequence(std::string appid); const std::string& GetAppId() const; const std::string& GetAfter() const; diff --git a/server/database.hh b/server/database.hh index 06c4e99..9ed07fd 100644 --- a/server/database.hh +++ b/server/database.hh @@ -68,7 +68,7 @@ namespace aul { class Database { public: - Database(std::string path, bool enable_foreign_keys = true); + explicit Database(std::string path, bool enable_foreign_keys = true); virtual ~Database(); void Open(int flags = SQLITE_OPEN_READWRITE); diff --git a/src/app_signal.cc b/src/app_signal.cc index cead0f4..fff4780 100644 --- a/src/app_signal.cc +++ b/src/app_signal.cc @@ -68,48 +68,48 @@ class Event { signal_name_(std::move(signal_name)), cb_(cb), user_data_(user_data) { - } + } - virtual ~Event() { - Unsubscribe(); - } + virtual ~Event() { + Unsubscribe(); + } - const std::string& GetObjectPath() const { return object_path_; } + const std::string& GetObjectPath() const { return object_path_; } - const std::string& GetInterfaceName() const { return interface_name_; } + const std::string& GetInterfaceName() const { return interface_name_; } - const std::string& GetSignalName() const { return signal_name_; } + const std::string& GetSignalName() const { return signal_name_; } - virtual void Invoke(GVariant* parameters) {} + virtual void Invoke(GVariant* parameters) {} - T GetCallback() const { return cb_; } + T GetCallback() const { return cb_; } - void* GetUserData() const { return user_data_; } + void* GetUserData() const { return user_data_; } - bool Subscribe() { - if (source_ != 0) - return true; + bool Subscribe() { + if (source_ != 0) + return true; - GError* err = nullptr; - conn_ = g_bus_get_sync(G_BUS_TYPE_SYSTEM, nullptr, &err); - if (conn_ == nullptr) { - _E("g_bus_get_sync() is failed. error(%s)", err ? err->message : ""); - g_clear_error(&err); - return false; - } + GError* err = nullptr; + conn_ = g_bus_get_sync(G_BUS_TYPE_SYSTEM, nullptr, &err); + if (conn_ == nullptr) { + _E("g_bus_get_sync() is failed. error(%s)", err ? err->message : ""); + g_clear_error(&err); + return false; + } - source_ = g_dbus_connection_signal_subscribe(conn_, nullptr, - interface_name_.c_str(), signal_name_.c_str(), object_path_.c_str(), + source_ = g_dbus_connection_signal_subscribe(conn_, nullptr, + interface_name_.c_str(), signal_name_.c_str(), object_path_.c_str(), nullptr, G_DBUS_SIGNAL_FLAGS_NONE, DBusSignalCb, this, nullptr); - if (source_ == 0) { - _E("g_dbus_connection_signal_subscribe() is failed"); - g_object_unref(conn_); - conn_ = nullptr; - return false; - } + if (source_ == 0) { + _E("g_dbus_connection_signal_subscribe() is failed"); + g_object_unref(conn_); + conn_ = nullptr; + return false; + } - return true; - } + return true; + } private: void Unsubscribe() { @@ -448,7 +448,8 @@ extern "C" API int aul_listen_app_launch_signal_v2( extern "C" API int aul_listen_booting_done_signal( aul_booting_done_event_cb callback, void* user_data) { - _W("DEPRECATION WARNING: %s() is deprecated and will be remove from next release.", __FUNCTION__); + _W("DEPRECATION WARNING: %s() is deprecated " + "and will be remove from next release.", __FUNCTION__); if (!context.BootingDoneEventSubscribe(callback, user_data)) return AUL_R_ERROR; @@ -457,7 +458,8 @@ extern "C" API int aul_listen_booting_done_signal( extern "C" API int aul_listen_cooldown_signal(aul_cooldown_event_cb callback, void *user_data) { - _W("DEPRECATION WARNING: %s() is deprecated and will be remove from next release.", __FUNCTION__); + _W("DEPRECATION WARNING: %s() is deprecated " + "and will be remove from next release.", __FUNCTION__); if (!context.CooldownEventSubscribe(callback, user_data)) return AUL_R_ERROR; diff --git a/src/aul_svc.cc b/src/aul_svc.cc index 5a35a0e..cb565db 100644 --- a/src/aul_svc.cc +++ b/src/aul_svc.cc @@ -84,7 +84,7 @@ class CbInfo { class AliasInfo { public: - AliasInfo(std::string alias_appid) + explicit AliasInfo(std::string alias_appid) : alias_appid_(std::move(alias_appid)) { } diff --git a/src/launch.cc b/src/launch.cc index 50e9b2e..3d05137 100644 --- a/src/launch.cc +++ b/src/launch.cc @@ -258,7 +258,7 @@ extern "C" API int aul_request_message_port_socket_pair(int* fd) { int ret = AppRequest(APP_GET_MP_SOCKET_PAIR) .SendCmdOnly(AUL_SOCK_ASYNC); if (ret > 0) { - int fds[2] = {0,}; + int fds[2] = {0, }; ret = aul_sock_recv_reply_sock_fd(ret, &fds, 2); if (ret == 0) { fd[0] = fds[0]; diff --git a/test/app_control_tests/test_app_control.cc b/test/app_control_tests/test_app_control.cc index c2c3054..eb3bef0 100644 --- a/test/app_control_tests/test_app_control.cc +++ b/test/app_control_tests/test_app_control.cc @@ -201,18 +201,18 @@ TEST_F(AppControlTest, app_control_resolution_call_tel) { } TEST_F(AppControlTest, app_control_resolution_compose) { - bool ret= Compare(APP_CONTROL_OPERATION_COMPOSE, "", ""); + bool ret = Compare(APP_CONTROL_OPERATION_COMPOSE, "", ""); EXPECT_EQ(ret, true); } TEST_F(AppControlTest, app_control_resolution_compose_sms) { - bool ret= Compare(APP_CONTROL_OPERATION_COMPOSE, + bool ret = Compare(APP_CONTROL_OPERATION_COMPOSE, "sms:+19725551212?body=hello%20there", ""); EXPECT_EQ(ret, true); } TEST_F(AppControlTest, app_control_resolution_compose_mmsto) { - bool ret= Compare(APP_CONTROL_OPERATION_COMPOSE, + bool ret = Compare(APP_CONTROL_OPERATION_COMPOSE, "mmsto:addr1%2C%20addr2", ""); EXPECT_EQ(ret, true); } @@ -403,7 +403,7 @@ TEST_F(AppControlTest, app_control_resolution_setting_location) { } TEST_F(AppControlTest, app_control_resolution_setting_messages) { - bool ret= Compare(APP_CONTROL_OPERATION_SETTING_MESSAGES, + bool ret = Compare(APP_CONTROL_OPERATION_SETTING_MESSAGES, "", ""); EXPECT_EQ(ret, true); } @@ -433,19 +433,19 @@ TEST_F(AppControlTest, app_control_resolution_setting_vpn) { } TEST_F(AppControlTest, app_control_resolution_share_text) { - bool ret= Compare(APP_CONTROL_OPERATION_SHARE_TEXT, + bool ret = Compare(APP_CONTROL_OPERATION_SHARE_TEXT, "", ""); EXPECT_EQ(ret, true); } TEST_F(AppControlTest, app_control_resolution_share_text_sms) { - bool ret= Compare(APP_CONTROL_OPERATION_SHARE_TEXT, + bool ret = Compare(APP_CONTROL_OPERATION_SHARE_TEXT, "sms:+19725551212?body=hello%20there", ""); EXPECT_EQ(ret, true); } TEST_F(AppControlTest, app_control_resolution_share_text_mmsto) { - bool ret= Compare(APP_CONTROL_OPERATION_SHARE_TEXT, + bool ret = Compare(APP_CONTROL_OPERATION_SHARE_TEXT, "mmsto:addr1%2C%20addr2", ""); EXPECT_EQ(ret, true); }