From db2de97800950eee5802473430ac87ccd4306d0a Mon Sep 17 00:00:00 2001 From: pwx1285814 Date: Tue, 2 Jul 2024 21:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99UT=E4=B8=AD=E6=B7=BB=E5=8A=A0namespace?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: pwx1285814 --- .../screensinktest/include/dscreen_sink_handler_test.h | 6 +++--- .../screensinktest/src/dscreen_sink_handler_test.cpp | 4 ++-- .../include/callback/dscreen_source_callback_test.h | 4 ++-- .../screensourcetest/include/dscreen_source_common.h | 7 +++---- .../include/dscreen_source_handler_test.h | 6 +++--- .../src/callback/dscreen_source_callback_test.cpp | 4 ++-- .../screensourcetest/src/dscreen_source_handler_test.cpp | 4 ++-- .../unittest/screenhandler/src/dscreen_handler_test.cpp | 4 ++-- .../dscreenservice/src/dscreen_sink_stub_test.cpp | 4 ++-- .../screenregionmgr/1.0/src/screenregion_test.cpp | 8 ++++---- .../screenregionmgr/1.0/src/screenregionmgr_test.cpp | 6 +++--- .../screenregionmgr/2.0/src/screenregionmgr_test.cpp | 8 ++++---- .../dscreenmgr/1.0/src/dscreen_manager_test.cpp | 6 +++--- .../sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp | 6 +++--- .../dscreenmgr/1.0/src/screen_manager_adapter_test.cpp | 4 ++-- .../dscreenmgr/2.0/src/dscreen_manager_test.cpp | 6 +++--- .../sourceservice/dscreenmgr/2.0/src/dscreen_test.cpp | 6 +++--- .../src/callback/dscreen_source_callback_stub_test.cpp | 6 +++--- .../dscreenservice/src/dscreen_source_stub_test.cpp | 4 ++-- .../screensinkprocessor/src/image_sink_decoder_test.cpp | 4 ++-- .../screensinkprocessor/src/image_sink_processor_test.cpp | 4 ++-- .../screensinktrans/src/screen_sink_trans_test.cpp | 4 ++-- .../screensourcetrans/src/screen_source_trans_test.cpp | 4 ++-- 23 files changed, 59 insertions(+), 60 deletions(-) diff --git a/interfaces/innerkits/native_cpp/test/unittest/screensinktest/include/dscreen_sink_handler_test.h b/interfaces/innerkits/native_cpp/test/unittest/screensinktest/include/dscreen_sink_handler_test.h index 4b58a495..c80376c8 100644 --- a/interfaces/innerkits/native_cpp/test/unittest/screensinktest/include/dscreen_sink_handler_test.h +++ b/interfaces/innerkits/native_cpp/test/unittest/screensinktest/include/dscreen_sink_handler_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -35,7 +35,7 @@ public: void SetUp(); void TearDown(); }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/test/unittest/screensinktest/src/dscreen_sink_handler_test.cpp b/interfaces/innerkits/native_cpp/test/unittest/screensinktest/src/dscreen_sink_handler_test.cpp index 67185737..6cfc342b 100644 --- a/interfaces/innerkits/native_cpp/test/unittest/screensinktest/src/dscreen_sink_handler_test.cpp +++ b/interfaces/innerkits/native_cpp/test/unittest/screensinktest/src/dscreen_sink_handler_test.cpp @@ -126,5 +126,5 @@ HWTEST_F(DScreenSinkHandlerTest, OnRemoteSinkSvrDied_001, TestSize.Level1) DScreenSinkHandler::GetInstance().sinkSvrRecipient_->OnRemoteDied(remote); EXPECT_EQ(nullptr, DScreenSinkHandler::GetInstance().dScreenSinkProxy_); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/callback/dscreen_source_callback_test.h b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/callback/dscreen_source_callback_test.h index 1dea2a11..26576303 100644 --- a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/callback/dscreen_source_callback_test.h +++ b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/callback/dscreen_source_callback_test.h @@ -33,7 +33,7 @@ public: sptr dScreenSourceCallback_ = nullptr; }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_common.h b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_common.h index 54139634..e94f2170 100644 --- a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_common.h +++ b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -86,8 +86,7 @@ public: return 0; } }; -} -} - +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_handler_test.h b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_handler_test.h index 8159566f..7e7a98a4 100644 --- a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_handler_test.h +++ b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/include/dscreen_source_handler_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -32,7 +32,7 @@ public: void SetUp(); void TearDown(); }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/callback/dscreen_source_callback_test.cpp b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/callback/dscreen_source_callback_test.cpp index c889aa6c..3a719197 100644 --- a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/callback/dscreen_source_callback_test.cpp +++ b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/callback/dscreen_source_callback_test.cpp @@ -216,5 +216,5 @@ HWTEST_F(DScreenSourceCallbackTest, PopUnregRegisterCallback_001, TestSize.Level int32_t sizeEnd = dScreenSourceCallback_->unregisterCallbackMap_.size(); EXPECT_GT(sizeFront, sizeEnd); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/dscreen_source_handler_test.cpp b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/dscreen_source_handler_test.cpp index 311fe29f..df780acf 100644 --- a/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/dscreen_source_handler_test.cpp +++ b/interfaces/innerkits/native_cpp/test/unittest/screensourcetest/src/dscreen_source_handler_test.cpp @@ -363,5 +363,5 @@ HWTEST_F(DScreenSourceHandlerTest, OnRemoteDied_002, TestSize.Level1) DScreenSourceHandler::GetInstance().sourceSvrRecipient_->OnRemoteDied(remote); EXPECT_EQ(remote, remote); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/screenhandler/test/unittest/screenhandler/src/dscreen_handler_test.cpp b/screenhandler/test/unittest/screenhandler/src/dscreen_handler_test.cpp index 9230dfca..8a99bd01 100644 --- a/screenhandler/test/unittest/screenhandler/src/dscreen_handler_test.cpp +++ b/screenhandler/test/unittest/screenhandler/src/dscreen_handler_test.cpp @@ -124,5 +124,5 @@ HWTEST_F(DScreenHandlerTest, QueryCodecInfo_001, TestSize.Level1) std::string ret = DScreenHandler::GetInstance().QueryCodecInfo(); EXPECT_EQ(DScreenHandler::GetInstance().codecInfoStr_, ret); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp b/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp index 5cdd6df0..744184dd 100644 --- a/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp +++ b/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp @@ -294,5 +294,5 @@ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_005, TestSize.Level1) int32_t ret = sinkStub->DScreenNotifyInner(data, reply, option); EXPECT_EQ(ret, DH_SUCCESS); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregion_test.cpp b/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregion_test.cpp index dbc699de..29a01970 100644 --- a/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregion_test.cpp +++ b/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregion_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -268,6 +268,6 @@ HWTEST_F(ScreenRegionTestV1, Stop_003, TestSize.Level1) EXPECT_EQ(ERR_DH_SCREEN_TRANS_NULL_VALUE, ret); } -} -} -} \ No newline at end of file +} // namespace V1_0 +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregionmgr_test.cpp b/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregionmgr_test.cpp index 3620f267..2a2ff601 100644 --- a/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregionmgr_test.cpp +++ b/services/screenservice/test/unittest/sinkservice/screenregionmgr/1.0/src/screenregionmgr_test.cpp @@ -282,6 +282,6 @@ HWTEST_F(ScreenRegionManagerTestV1, CheckContentJson_004, TestSize.Level1) testJson[KEY_VERSION] = "test"; EXPECT_TRUE(ScreenRegionManager::GetInstance().CheckContentJson(testJson)); } -} -} -} \ No newline at end of file +} // namespace V1_0 +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sinkservice/screenregionmgr/2.0/src/screenregionmgr_test.cpp b/services/screenservice/test/unittest/sinkservice/screenregionmgr/2.0/src/screenregionmgr_test.cpp index 9ebb32db..f1823306 100644 --- a/services/screenservice/test/unittest/sinkservice/screenregionmgr/2.0/src/screenregionmgr_test.cpp +++ b/services/screenservice/test/unittest/sinkservice/screenregionmgr/2.0/src/screenregionmgr_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -109,6 +109,6 @@ HWTEST_F(ScreenRegionManagerTestV2, OnProviderEvent_002, TestSize.Level1) int32_t ret = engineProviderListener.OnProviderEvent(event); EXPECT_EQ(DH_SUCCESS, ret); } -} -} -} \ No newline at end of file +} // namespace V2_0 +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_manager_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_manager_test.cpp index 274e2d91..73a0961e 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_manager_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_manager_test.cpp @@ -364,6 +364,6 @@ HWTEST_F(DScreenManagerTestV1, DisableDistributedScreen_001, TestSize.Level1) ret = DScreenManager::GetInstance().UnInit(); EXPECT_EQ(DH_SUCCESS, ret); } -} -} -} \ No newline at end of file +} // namespace V1_0 +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp index 6189db86..0c507d60 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/dscreen_test.cpp @@ -464,6 +464,6 @@ HWTEST_F(DScreenTestV1, Stop_002, TestSize.Level1) int32_t ret = dScreen_->Stop(); EXPECT_EQ(ERR_DH_SCREEN_TRANS_NULL_VALUE, ret); } -} -} -} \ No newline at end of file +} // namespace V1_0 +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp index e10ff981..77d75ecd 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp @@ -263,5 +263,5 @@ HWTEST_F(DScreenManagerAdapterTest, GetMapRelation_002, TestSize.Level1) DisablePermissionAccess(tokenId_); EXPECT_NE(nullptr, ret); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_manager_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_manager_test.cpp index 0fdf2b36..a244eac9 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_manager_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_manager_test.cpp @@ -363,6 +363,6 @@ HWTEST_F(DScreenManagerTestV2, PublishMessage_001, TestSize.Level1) int32_t ret = DScreenManager::GetInstance().Release(); EXPECT_EQ(DH_SUCCESS, ret); } -} -} -} \ No newline at end of file +} // namespace V2_0 +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_test.cpp index 18a0e5b8..19a7f02d 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenmgr/2.0/src/dscreen_test.cpp @@ -516,6 +516,6 @@ HWTEST_F(DScreenTestV2, ChooseCodecType_004, TestSize.Level1) int32_t ret = dScreen_->ChooseCodecType(localVideoEncoders, rmtVideoDecoders); EXPECT_EQ(ret, DH_SUCCESS); } -} -} -} \ No newline at end of file +} // namespace V2_0 +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sourceservice/dscreenservice/src/callback/dscreen_source_callback_stub_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenservice/src/callback/dscreen_source_callback_stub_test.cpp index 49231574..d67792e9 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenservice/src/callback/dscreen_source_callback_stub_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenservice/src/callback/dscreen_source_callback_stub_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -137,5 +137,5 @@ HWTEST_F(DScreenSourceCallbackStubTest, OnNotifyUnregResult_001, TestSize.Level1 ret = sourceCbkProxy.OnNotifyUnregResult("devId000", "dhId000", "reqId000", 0, "data000"); EXPECT_EQ(DH_SUCCESS, ret); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sourceservice/dscreenservice/src/dscreen_source_stub_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenservice/src/dscreen_source_stub_test.cpp index 1277198e..a93ab47b 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenservice/src/dscreen_source_stub_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenservice/src/dscreen_source_stub_test.cpp @@ -554,5 +554,5 @@ HWTEST_F(DScreenSourceStubTest, CheckConfigParams_003, TestSize.Level1) result = stubPtr->CheckConfigParams("devId", "dhId", "key", exceedParamMaxSizeStr); EXPECT_FALSE(result); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_decoder_test.cpp b/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_decoder_test.cpp index baa3e9ec..6f9a503f 100644 --- a/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_decoder_test.cpp +++ b/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_decoder_test.cpp @@ -503,5 +503,5 @@ HWTEST_F(ImageSinkDecoderTest, process_data_test_001, TestSize.Level1) imageDecoder_->StopInputThread(); EXPECT_EQ(false, imageDecoder_->isDecoderReady_); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp b/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp index 7dd6a0a6..85ffa882 100644 --- a/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp +++ b/services/screentransport/test/unittest/screensinkprocessor/src/image_sink_processor_test.cpp @@ -205,5 +205,5 @@ HWTEST_F(ImageSinkProcessorTest, processimage_test_002, TestSize.Level1) std::shared_ptr data = std::make_shared(DATA_LEN); EXPECT_EQ(ERR_DH_SCREEN_TRANS_NULL_VALUE, processor_->ProcessImage(data)); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp b/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp index a15838fa..24185062 100644 --- a/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp +++ b/services/screentransport/test/unittest/screensinktrans/src/screen_sink_trans_test.cpp @@ -234,5 +234,5 @@ HWTEST_F(ScreenSinkTransTest, check_trans_param_test_001, TestSize.Level1) param_.screenHeight_ = DSCREEN_MAX_SCREEN_DATA_HEIGHT; EXPECT_EQ(DH_SUCCESS, trans_->CheckTransParam(param_, param_, peerDevId_)); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screentransport/test/unittest/screensourcetrans/src/screen_source_trans_test.cpp b/services/screentransport/test/unittest/screensourcetrans/src/screen_source_trans_test.cpp index 2fbd7d56..4e940ad4 100644 --- a/services/screentransport/test/unittest/screensourcetrans/src/screen_source_trans_test.cpp +++ b/services/screentransport/test/unittest/screensourcetrans/src/screen_source_trans_test.cpp @@ -626,5 +626,5 @@ HWTEST_F(ScreenSourceTransTest, SetConsumerSurface_002, TestSize.Level1) int32_t ret = trans->SetConsumerSurface(); EXPECT_EQ(DH_SUCCESS, ret); } -} -} +} // namespace DistributedHardware +} // namespace OHOS -- Gitee