1 Star 0 Fork 503

luojingsong/notification_distributed_notification_service_2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
lock.patch 5.69 KB
一键复制 编辑 原始数据 按行查看 历史
luojingsong 提交于 2025-04-30 10:43 +08:00 . 11
From 006c1a47c6061d086bb46dd6bb9ba4592709db4b Mon Sep 17 00:00:00 2001
From: openharmony_ci <120357966@qq.com>
Date: Thu, 10 Apr 2025 11:44:05 +0000
Subject: [PATCH] =?UTF-8?q?tdd=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
TicketNo: DTS0000000000000
Description: tdd失败
Team:EMUI framework
Feature or Bugfix:Bugfix
Binary Source: sync from gitee
PrivateCode(Yes/No):No
------ DO NOT MODIFY, AUTO-GENERATED! ------
Gitee-Issue: #IBZUER
Time: "2025-04-10T11:48:10.526959Z"
PR-Num: 2958
Gitee-PR: https://openharmony.gitee.com/openharmony/notification_distributed_notification_service/pulls/2958
Change-Id: I1744285680303b7ab07c07f389a74dee85326082
Reviewed-by: y30058781
Approved-by: w00580831
Merged-on: https://open.codehub.huawei.com/OpenSourceCenter_CR/openharmony/notification_distributed_notification_service/-/change_requests/3298
Merged-by: public hisicitools
---
.../ans/test/unittest/notification_test.cpp | 3 +-
.../advanced_notification_service_test.cpp | 56 -------------------
2 files changed, 1 insertion(+), 58 deletions(-)
diff --git a/frameworks/ans/test/unittest/notification_test.cpp b/frameworks/ans/test/unittest/notification_test.cpp
index 17937fcd..7346ad23 100644
--- a/frameworks/ans/test/unittest/notification_test.cpp
+++ b/frameworks/ans/test/unittest/notification_test.cpp
@@ -323,8 +323,7 @@ HWTEST_F(NotificationTest, Dump_00001, Function | SmallTest | Level1)
"notificationBundleOption = null, agentBundle = null, creatorUserId = -1, ownerUserId = -1, "
"receiverUserId = -1, updateDeadLine = 0, finishDeadLine = 0, sound = , distributed = 0: "
"flag: 0, unifiedGroupInfo_ = null }, postTime = 0, "
- "sound = nullptr, vibrationStyle = [], updateTimer = 0, finishTimer = 0, archiveTimer = 0, "
- "isPrivileged = false }";
+ "sound = nullptr, vibrationStyle = [], updateTimer = 0, finishTimer = 0, archiveTimer = 0 }";
EXPECT_EQ(rrc->Dump(), ret);
}
diff --git a/services/ans/test/unittest/advanced_notification_service_test.cpp b/services/ans/test/unittest/advanced_notification_service_test.cpp
index f4315130..a8f38329 100644
--- a/services/ans/test/unittest/advanced_notification_service_test.cpp
+++ b/services/ans/test/unittest/advanced_notification_service_test.cpp
@@ -880,34 +880,6 @@ HWTEST_F(AdvancedNotificationServiceTest, AdvancedNotificationServiceTest_10600,
ASSERT_EQ(result->GetEndDate(), 0);
}
-/**
- * @tc.number : AdvancedNotificationServiceTest_10700
- * @tc.name : ANS_GetDisturbMode_10700
- * @tc.desc : Test GetDisturbMode function
- */
-HWTEST_F(AdvancedNotificationServiceTest, AdvancedNotificationServiceTest_10700, Function | SmallTest | Level1)
-{
- std::chrono::system_clock::time_point timePoint = std::chrono::system_clock::now();
- timePoint = std::chrono::time_point_cast<std::chrono::minutes>(timePoint);
- timePoint += std::chrono::hours(1);
- auto beginDuration = std::chrono::duration_cast<std::chrono::milliseconds>(timePoint.time_since_epoch());
- int64_t beginDate = beginDuration.count();
- timePoint += std::chrono::hours(1);
- auto endDuration = std::chrono::duration_cast<std::chrono::milliseconds>(timePoint.time_since_epoch());
- int64_t endDate = endDuration.count();
-
- sptr<NotificationDoNotDisturbDate> date =
- new NotificationDoNotDisturbDate(NotificationConstant::DoNotDisturbType::ONCE, beginDate, endDate);
- ASSERT_EQ((int)advancedNotificationService_->SetDoNotDisturbDate(date), (int)ERR_OK);
-
- sptr<NotificationDoNotDisturbDate> result = nullptr;
- ASSERT_EQ((int)advancedNotificationService_->GetDoNotDisturbDate(result), (int)ERR_OK);
- ASSERT_NE(result, nullptr);
- ASSERT_EQ(result->GetDoNotDisturbType(), NotificationConstant::DoNotDisturbType::ONCE);
- ASSERT_EQ(result->GetBeginDate(), beginDate);
- ASSERT_EQ(result->GetEndDate(), endDate);
-}
-
/**
* @tc.number : AdvancedNotificationServiceTest_10800
* @tc.name : ANS_GetDisturbMode_10800
@@ -936,34 +908,6 @@ HWTEST_F(AdvancedNotificationServiceTest, AdvancedNotificationServiceTest_10800,
ASSERT_EQ(result->GetEndDate(), endDate);
}
-/**
- * @tc.number : AdvancedNotificationServiceTest_10900
- * @tc.name : ANS_GetDisturbMode_10900
- * @tc.desc : Test GetDisturbMode function
- */
-HWTEST_F(AdvancedNotificationServiceTest, AdvancedNotificationServiceTest_10900, Function | SmallTest | Level1)
-{
- std::chrono::system_clock::time_point timePoint = std::chrono::system_clock::now();
- timePoint = std::chrono::time_point_cast<std::chrono::minutes>(timePoint);
- timePoint += std::chrono::hours(1);
- auto beginDuration = std::chrono::duration_cast<std::chrono::milliseconds>(timePoint.time_since_epoch());
- int64_t beginDate = beginDuration.count();
- timePoint += std::chrono::hours(1);
- auto endDuration = std::chrono::duration_cast<std::chrono::milliseconds>(timePoint.time_since_epoch());
- int64_t endDate = endDuration.count();
-
- sptr<NotificationDoNotDisturbDate> date =
- new NotificationDoNotDisturbDate(NotificationConstant::DoNotDisturbType::CLEARLY, beginDate, endDate);
- ASSERT_EQ((int)advancedNotificationService_->SetDoNotDisturbDate(date), (int)ERR_OK);
-
- sptr<NotificationDoNotDisturbDate> result = nullptr;
- ASSERT_EQ((int)advancedNotificationService_->GetDoNotDisturbDate(result), (int)ERR_OK);
- ASSERT_NE(result, nullptr);
- ASSERT_EQ(result->GetDoNotDisturbType(), NotificationConstant::DoNotDisturbType::CLEARLY);
- ASSERT_EQ(result->GetBeginDate(), beginDate);
- ASSERT_EQ(result->GetEndDate(), endDate);
-}
-
/**
* @tc.number : AdvancedNotificationServiceTest_12900
* @tc.name : ANS_HasNotificationPolicyAccessPermission_0100
--
2.34.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/songbao1/notification_distributed_notification_service_2.git
git@gitee.com:songbao1/notification_distributed_notification_service_2.git
songbao1
notification_distributed_notification_service_2
notification_distributed_notification_service_2
master

搜索帮助