From be8946730bd89a535ea76653421942b2d8c85ed8 Mon Sep 17 00:00:00 2001 From: wwx1143030 Date: Tue, 27 Sep 2022 17:59:22 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:https://gitee.com/openharmony/notificat?= =?UTF-8?q?ion=5Fcommon=5Fevent=5Fservice/issues/I5T8PA=20Description:?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=88=86=E6=94=AF=E8=A6=86=E7=9B=96=E7=8E=87?= =?UTF-8?q?111=20Sig:SIG=5FApplicationFramework=20Feature=20or=20Bugfix:Bu?= =?UTF-8?q?gfix=20Binary=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wwx1143030 Change-Id: Ib0eb96c901f53f541722b2edeed58615fae3a06b --- tools/test/mock/mock_ans_notification.cpp | 6 +++--- .../dump/notification_shell_command_dump_test.cpp | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/test/mock/mock_ans_notification.cpp b/tools/test/mock/mock_ans_notification.cpp index 071d92d7e..75a8097c1 100644 --- a/tools/test/mock/mock_ans_notification.cpp +++ b/tools/test/mock/mock_ans_notification.cpp @@ -23,10 +23,10 @@ ErrCode AnsNotification::SetNotificationsEnabledForSpecifiedBundle( const NotificationBundleOption &bundleOption, const std::string &deviceId, bool enabled) { if (bundleOption.GetBundleName() == "gg") { - return ERR_OK; + return ERR_OK; } else { - return ERR_ANS_SERVICE_NOT_CONNECTED; - } + return ERR_ANS_SERVICE_NOT_CONNECTED; + } } } // namespace Notification } // namespace OHOS \ No newline at end of file diff --git a/tools/test/unittest/dump/notification_shell_command_dump_test.cpp b/tools/test/unittest/dump/notification_shell_command_dump_test.cpp index ab7c2f0a6..e325a043b 100644 --- a/tools/test/unittest/dump/notification_shell_command_dump_test.cpp +++ b/tools/test/unittest/dump/notification_shell_command_dump_test.cpp @@ -78,6 +78,14 @@ static char g_enableObjectNull[] = " --recent-count -c set the max count of recent notifications keeping in memory\n --enable-notification" " -e set notification enabled for the bundle, eg: -e com.example:10100:1\n"; +static char g_enableObjectNull[] = +"error: object is null\n" +"error: object is null\n" +"usage: anm setting []\n" +"options list:\n --help, -h help menu\n" +" --recent-count -c set the max count of recent notifications keeping in memory\n --enable-notification" +" -e set notification enabled for the bundle, eg: -e com.example:10100:1\n"; + static char g_bundleName[] = "example"; static char g_commandActive[] = "active"; static char g_commandRecent[] = "recent"; -- Gitee