From 27ee672d9129952cb155df2c555e150ad723934e Mon Sep 17 00:00:00 2001 From: gaoqiang_strong Date: Tue, 12 Sep 2023 11:43:12 +0800 Subject: [PATCH] add ut Signed-off-by: gaoqiang_strong --- .../include/av_sender_engine_test.h | 16 ++ .../src/av_sender_engine_test.cpp | 139 +++++++++++++++++- .../src/av_sender_engine_provider_test.cpp | 4 + .../plugin/test/{ => unittest}/BUILD.gn | 17 ++- .../plugin/test/unittest/core/BUILD.gn | 70 +++++++++ .../test/unittest/core/avtrans_input_test.cpp | 62 ++++++++ .../test/unittest/core/avtrans_input_test.h | 79 ++++++++++ .../unittest/core/avtrans_output_test.cpp | 51 +++++++ .../test/unittest/core/avtrans_output_test.h | 70 +++++++++ .../av_trans_input/daudio_input_test/BUILD.gn | 2 +- .../daudio_input_test/daudio_input_test.cpp | 0 .../daudio_input_test/daudio_input_test.h | 0 .../dscreen_input_test/BUILD.gn | 2 +- .../dscreen_input_test/dscreen_input_test.cpp | 0 .../dscreen_input_test/dscreen_input_test.h | 0 .../dsoftbus_input_audio_test/BUILD.gn | 2 +- .../dsoftbus_input_audio_plugin_test.cpp | 0 .../dsoftbus_input_audio_plugin_test.h | 0 .../dsoftbus_input_test/BUILD.gn | 2 +- .../dsoftbus_input_plugin_test.cpp | 0 .../dsoftbus_input_plugin_test.h | 0 .../daudio_output_test/BUILD.gn | 2 +- .../daudio_output_test/daudio_output_test.cpp | 0 .../daudio_output_test/daudio_output_test.h | 0 .../dscreen_output_test/BUILD.gn | 2 +- .../dscreen_output_test.cpp | 0 .../dscreen_output_test/dscreen_output_test.h | 0 .../dsoftbus_output_audio_test/BUILD.gn | 2 +- .../dsoftbus_output_audio_plugin_test.cpp | 0 .../dsoftbus_output_audio_plugin_test.h | 0 .../dsoftbus_output_test/BUILD.gn | 2 +- .../dsoftbus_output_plugin_test.cpp | 0 .../dsoftbus_output_plugin_test.h | 0 bundle.json | 2 +- 34 files changed, 507 insertions(+), 19 deletions(-) rename av_transport/av_trans_engine/plugin/test/{ => unittest}/BUILD.gn (49%) create mode 100644 av_transport/av_trans_engine/plugin/test/unittest/core/BUILD.gn create mode 100644 av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.cpp create mode 100644 av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.h create mode 100644 av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.cpp create mode 100644 av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.h rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/daudio_input_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/daudio_input_test/daudio_input_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/daudio_input_test/daudio_input_test.h (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dscreen_input_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dscreen_input_test/dscreen_input_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dscreen_input_test/dscreen_input_test.h (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dsoftbus_input_audio_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.h (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dsoftbus_input_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.h (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/daudio_output_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/daudio_output_test/daudio_output_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/daudio_output_test/daudio_output_test.h (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dscreen_output_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dscreen_output_test/dscreen_output_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dscreen_output_test/dscreen_output_test.h (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dsoftbus_output_audio_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.h (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dsoftbus_output_test/BUILD.gn (97%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.cpp (100%) rename av_transport/av_trans_engine/plugin/test/{ => unittest/plugins}/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.h (100%) diff --git a/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/include/av_sender_engine_test.h b/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/include/av_sender_engine_test.h index 6cdca1e1..7f4519ee 100644 --- a/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/include/av_sender_engine_test.h +++ b/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/include/av_sender_engine_test.h @@ -27,6 +27,7 @@ #include "av_trans_types.h" #include "av_trans_utils.h" #include "i_av_sender_engine.h" +#include "i_av_sender_engine_callback.h" #include "softbus_channel_adapter.h" #include "distributed_hardware_fwk_kit.h" #include "av_trans_control_center_callback.h" @@ -56,6 +57,21 @@ public: void SetUp() override; void TearDown() override; }; +class SenderEngineCallback : public IAVSenderEngineCallback { +public: + SenderEngineCallback() = default; + ~SenderEngineCallback() override = default; + int32_t OnSenderEvent(const AVTransEvent &event) override + { + (void) event; + return DH_AVT_SUCCESS; + } + int32_t OnMessageReceived(const std::shared_ptr &message) override + { + (void) message; + return DH_AVT_SUCCESS; + } +}; } // namespace DistributedHardware } // namespace OHOS diff --git a/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/src/av_sender_engine_test.cpp b/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/src/av_sender_engine_test.cpp index 7edd3151..1e009634 100644 --- a/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/src/av_sender_engine_test.cpp +++ b/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine/src/av_sender_engine_test.cpp @@ -17,6 +17,7 @@ #include "pipeline/factory/filter_factory.h" #include "plugin_video_tags.h" +#include "distributed_hardware_fwk_kit.h" using namespace testing::ext; using namespace OHOS::DistributedHardware; @@ -48,6 +49,8 @@ HWTEST_F(AvSenderEngineTest, Initialize_001, testing::ext::TestSize.Level1) std::string peerDevId = "pEid"; auto sender = std::make_shared(ownerName, peerDevId); sender->initialized_ = true; + std::string value = MIME_VIDEO_H264; + sender->SetVideoCodecType(value); int32_t ret = sender->Initialize(); EXPECT_EQ(DH_AVT_SUCCESS, ret); } @@ -58,6 +61,8 @@ HWTEST_F(AvSenderEngineTest, Initialize_002, testing::ext::TestSize.Level1) std::string peerDevId = "pEid"; auto sender = std::make_shared(ownerName, peerDevId); sender->avInput_ = nullptr; + std::string value = MIME_VIDEO_H265; + sender->SetVideoCodecType(value); int32_t ret = sender->Initialize(); EXPECT_EQ(ERR_DH_AVT_INIT_FAILED, ret); } @@ -68,10 +73,35 @@ HWTEST_F(AvSenderEngineTest, Initialize_003, testing::ext::TestSize.Level1) std::string peerDevId = "pEid"; auto sender = std::make_shared(ownerName, peerDevId); sender->sessionName_ = ""; + sender->SetEnginePause(ownerName); + sender->pipeline_ = nullptr; + sender->SetEnginePause(ownerName); int32_t ret = sender->Initialize(); EXPECT_EQ(ERR_DH_AVT_INIT_FAILED, ret); } +HWTEST_F(AvSenderEngineTest, InitPipeline_001, testing::ext::TestSize.Level1) +{ + std::string ownerName = "001"; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + sender->ownerName_ = ""; + sender->SetEngineResume(ownerName); + sender->pipeline_ = nullptr; + sender->SetEngineResume(ownerName); + int32_t ret = sender->InitPipeline(); + EXPECT_EQ(ERR_DH_AVT_NULL_POINTER, ret); +} + +HWTEST_F(AvSenderEngineTest, InitPipeline_002, testing::ext::TestSize.Level1) +{ + std::string peerDevId = "pEid"; + auto sender = std::make_shared(OWNER_NAME_D_MIC, peerDevId); + sender->ownerName_ = ""; + int32_t ret = sender->InitPipeline(); + EXPECT_EQ(ERR_DH_AVT_NULL_POINTER, ret); +} + HWTEST_F(AvSenderEngineTest, CreateControlChannel_001, testing::ext::TestSize.Level1) { std::string ownerName = "001"; @@ -125,6 +155,19 @@ HWTEST_F(AvSenderEngineTest, Start_002, testing::ext::TestSize.Level1) EXPECT_EQ(DH_AVT_SUCCESS, ret); } +HWTEST_F(AvSenderEngineTest, Start_003, testing::ext::TestSize.Level1) +{ + std::string ownerName = "001"; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + sender->currentState_ = StateId::CH_CREATED; + sender->pipeline_ = std::make_shared(); + sender->dhfwkKit_ = std::make_shared(); + int32_t ret = sender->Start(); + sender->Stop(); + EXPECT_EQ(ERR_DH_AVT_CREATE_CHANNEL_FAILED, ret); +} + HWTEST_F(AvSenderEngineTest, Stop_001, testing::ext::TestSize.Level1) { std::string ownerName = "001"; @@ -296,12 +339,104 @@ HWTEST_F(AvSenderEngineTest, PreparePipeline_004, testing::ext::TestSize.Level1) HWTEST_F(AvSenderEngineTest, SendMessage_001, testing::ext::TestSize.Level1) { - std::string ownerName = "001"; + std::string ownerName = OWNER_NAME_D_MIC; std::string peerDevId = "pEid"; - std::string configParam = "value"; auto sender = std::make_shared(ownerName, peerDevId); + EventType type = EventType::EVENT_ADD_STREAM; + sender->NotifyStreamChange(type); int32_t ret = sender->SendMessage(nullptr); EXPECT_EQ(ERR_DH_AVT_INVALID_PARAM, ret); } + +HWTEST_F(AvSenderEngineTest, SendMessage_002, testing::ext::TestSize.Level1) +{ + std::string ownerName = OWNER_NAME_D_SPEAKER; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + EventType type = EventType::EVENT_ADD_STREAM; + sender->NotifyStreamChange(type); + std::shared_ptr message = std::make_shared(); + int32_t ret = sender->SendMessage(message); + EXPECT_EQ(ERR_DH_AVT_INVALID_PARAM, ret); +} + +HWTEST_F(AvSenderEngineTest, RegisterSenderCallback_001, testing::ext::TestSize.Level1) +{ + std::string ownerName = OWNER_NAME_D_SCREEN; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + EventType type = EventType::EVENT_ADD_STREAM; + sender->NotifyStreamChange(type); + std::shared_ptr callback = std::make_shared(); + int32_t ret = sender->RegisterSenderCallback(callback); + EXPECT_EQ(DH_AVT_SUCCESS, ret); +} + +HWTEST_F(AvSenderEngineTest, RegisterSenderCallback_002, testing::ext::TestSize.Level1) +{ + std::string ownerName = OWNER_NAME_D_CAMERA; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + EventType type = EventType::EVENT_ADD_STREAM; + sender->NotifyStreamChange(type); + std::shared_ptr callback = nullptr; + int32_t ret = sender->RegisterSenderCallback(callback); + EXPECT_EQ(ERR_DH_AVT_INVALID_PARAM, ret); +} + +HWTEST_F(AvSenderEngineTest, OnChannelEvent_001, testing::ext::TestSize.Level1) +{ + std::string ownerName = OWNER_NAME_D_CAMERA; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + sender->senderCallback_ = nullptr; + AVTransEvent transEvent; + transEvent.content = "content"; + transEvent.type = EventType::EVENT_CHANNEL_OPENED; + sender->OnChannelEvent(transEvent); + + sender->senderCallback_ = std::make_shared(); + sender->OnChannelEvent(transEvent); + Event event; + event.type = OHOS::Media::EventType::EVENT_PLUGIN_EVENT; + sender->OnEvent(event); + + EXPECT_EQ(StateId::CH_CREATED, sender->currentState_); +} + +HWTEST_F(AvSenderEngineTest, OnChannelEvent_002, testing::ext::TestSize.Level1) +{ + std::string ownerName = OWNER_NAME_D_CAMERA; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + AVTransEvent transEvent; + transEvent.content = "content"; + transEvent.type = EventType::EVENT_CHANNEL_OPEN_FAIL; + sender->senderCallback_ = std::make_shared(); + sender->OnChannelEvent(transEvent); + Event event; + event.type = OHOS::Media::EventType::EVENT_PLUGIN_EVENT; + sender->OnEvent(event); + + EXPECT_EQ(StateId::INITIALIZED, sender->currentState_); +} + +HWTEST_F(AvSenderEngineTest, OnChannelEvent_003, testing::ext::TestSize.Level1) +{ + std::string ownerName = OWNER_NAME_D_CAMERA; + std::string peerDevId = "pEid"; + auto sender = std::make_shared(ownerName, peerDevId); + AVTransEvent event; + event.content = "content"; + event.type = EventType::EVENT_CHANNEL_CLOSED; + sender->senderCallback_ = std::make_shared(); + sender->currentState_ = StateId::CH_CREATED; + sender->OnChannelEvent(event); + + event.type = EventType::EVENT_DATA_RECEIVED; + sender->OnChannelEvent(event); + + EXPECT_EQ(StateId::INITIALIZED, sender->currentState_); +} } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file diff --git a/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine_provider/src/av_sender_engine_provider_test.cpp b/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine_provider/src/av_sender_engine_provider_test.cpp index 0db2c6d6..04d7bc0d 100644 --- a/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine_provider/src/av_sender_engine_provider_test.cpp +++ b/av_transport/av_trans_engine/av_sender/test/unittest/av_sender_engine_provider/src/av_sender_engine_provider_test.cpp @@ -76,9 +76,13 @@ HWTEST_F(AvSenderEngineProviderTest, GetAVSenderEngineList_002, testing::ext::Te HWTEST_F(AvSenderEngineProviderTest, RegisterProviderCallback_001, testing::ext::TestSize.Level1) { std::string ownerName = "ownerName"; + std::string peerDevId = "peerDevId"; auto avSendProTest_ = std::make_shared(ownerName); std::shared_ptr callback = nullptr; int32_t ret = avSendProTest_->RegisterProviderCallback(callback); + AVTransEvent event = {EventType::EVENT_ADD_STREAM, ownerName, peerDevId}; + avSendProTest_->providerCallback_ = nullptr; + avSendProTest_->OnChannelEvent(event); EXPECT_EQ(DH_AVT_SUCCESS, ret); } } // namespace DistributedHardware diff --git a/av_transport/av_trans_engine/plugin/test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/BUILD.gn similarity index 49% rename from av_transport/av_trans_engine/plugin/test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/BUILD.gn index 0f3fc96f..50456f18 100644 --- a/av_transport/av_trans_engine/plugin/test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/BUILD.gn @@ -15,13 +15,14 @@ group("plugin_test") { testonly = true deps = [ - "av_trans_input/daudio_input_test:daudio_input_unittest", - "av_trans_input/dscreen_input_test:dscreen_input_unittest", - "av_trans_input/dsoftbus_input_audio_test:dsoftbus_input_audio_unittest", - "av_trans_input/dsoftbus_input_test:dsoftbus_input_unittest", - "av_trans_output/daudio_output_test:daudio_output_unittest", - "av_trans_output/dscreen_output_test:dscreen_output_unittest", - "av_trans_output/dsoftbus_output_audio_test:dsoftbus_output_audio_unittest", - "av_trans_output/dsoftbus_output_test:dsoftbus_output_unittest", + "core:avtrans_input_output_unittest", + "plugins/av_trans_input/daudio_input_test:daudio_input_unittest", + "plugins/av_trans_input/dscreen_input_test:dscreen_input_unittest", + "plugins/av_trans_input/dsoftbus_input_audio_test:dsoftbus_input_audio_unittest", + "plugins/av_trans_input/dsoftbus_input_test:dsoftbus_input_unittest", + "plugins/av_trans_output/daudio_output_test:daudio_output_unittest", + "plugins/av_trans_output/dscreen_output_test:dscreen_output_unittest", + "plugins/av_trans_output/dsoftbus_output_audio_test:dsoftbus_output_audio_unittest", + "plugins/av_trans_output/dsoftbus_output_test:dsoftbus_output_unittest", ] } diff --git a/av_transport/av_trans_engine/plugin/test/unittest/core/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/core/BUILD.gn new file mode 100644 index 00000000..070e97b9 --- /dev/null +++ b/av_transport/av_trans_engine/plugin/test/unittest/core/BUILD.gn @@ -0,0 +1,70 @@ +# Copyright (c) 2023 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/test.gni") +import("../../../../../distributed_av_transport.gni") + +module_out_path = "distributed_hardware_fwk/avtrans_input_output_unittest" + +ohos_unittest("AvTransInputOutputTest") { + module_out_path = module_out_path + + include_dirs = [ + "//third_party/ffmpeg", + "//third_party/json/include", + "${plugin_path}/core", + "${plugin_path}/interface", + "${common_path}/include", + ] + + sources = [ + "avtrans_input_test.cpp", + "avtrans_output_test.cpp", + ] + + cflags = [ + "-O2", + "-fPIC", + "-Wall", + "-frtti", + "-fexceptions", + "-Dprivate = public", + ] + cflags_cc = cflags + + deps = [ "//third_party/googletest:gtest" ] + + external_deps = [ + "bounds_checking_function:libsec_shared", + "c_utils:utils", + "eventhandler:libeventhandler", + "hilog:libhilog", + "histreamer:histreamer_base", + "histreamer:histreamer_codec_filters", + "histreamer:histreamer_ffmpeg_convert", + "histreamer:histreamer_plugin_base", + "kv_store:distributeddata_inner", + "safwk:system_ability_fwk", + ] + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"avtrans_input_output_test\"", + "LOG_DOMAIN=0xD004100", + ] +} + +group("avtrans_input_output_unittest") { + testonly = true + deps = [ ":AvTransInputOutputTest" ] +} diff --git a/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.cpp new file mode 100644 index 00000000..d4b6cecd --- /dev/null +++ b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "avtrans_input_test.h" + +namespace OHOS { +namespace DistributedHardware { +void AvTransInputTest::SetUpTestCase() {} + +void AvTransInputTest::TearDownTestCase() {} + +void AvTransInputTest::SetUp() +{ + uint32_t pkgVer = 2; + uint32_t apiVer = 2; + std::shared_ptr plugin = std::make_shared(); + input_ = std::make_shared(pkgVer, apiVer, plugin); +} + +void AvTransInputTest::TearDown() {} + +HWTEST_F(AvTransInputTest, Pause_001, TestSize.Level0) +{ + Status ret = input_->Pause(); + EXPECT_EQ(Status::OK, ret); +} + +HWTEST_F(AvTransInputTest, Resume_001, TestSize.Level0) +{ + Status ret = input_->Resume(); + EXPECT_EQ(Status::OK, ret); +} + +HWTEST_F(AvTransInputTest, PushData_001, TestSize.Level0) +{ + std::string inPort = "inPort"; + std::shared_ptr buffer = nullptr; + int32_t offset = 0; + Status ret = input_->PushData(inPort, buffer, offset); + EXPECT_EQ(Status::OK, ret); +} + +HWTEST_F(AvTransInputTest, SetDataCallback_001, TestSize.Level0) +{ + std::function)> callback = nullptr; + Status ret = input_->SetDataCallback(callback); + EXPECT_EQ(Status::OK, ret); +} +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.h b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.h new file mode 100644 index 00000000..fe707063 --- /dev/null +++ b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_input_test.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_AVTRANS_INPUT_TEST_H +#define OHOS_DISTRIBUTED_HARDWARE_AVTRANS_INPUT_TEST_H + +#include "gtest/gtest.h" + +#include "avtrans_input.h" + +#include "av_sync_utils.h" +#include "av_trans_buffer.h" +#include "av_trans_constants.h" +#include "av_trans_log.h" +#include "av_trans_meta.h" +#include "av_trans_types.h" +#include "av_trans_utils.h" +#include "avtrans_input_plugin.h" +#include "nlohmann/json.hpp" +#include "plugin_manager.h" +#include "plugin_types.h" + +namespace OHOS { +namespace DistributedHardware { +using namespace testing::ext; +using namespace std; +class AvTransInputTest : public testing::Test { +public: + AvTransInputTest() {} + ~AvTransInputTest() {} + + static void SetUpTestCase(void); + static void TearDownTestCase(void); + void SetUp(); + void TearDown(); + std::shared_ptr input_ = nullptr; +}; +class AvTransInputPluginTest : public AvTransInputPlugin { +public: + AvTransInputPluginTest() = default; + ~AvTransInputPluginTest() = default; + OHOS::Media::Plugin::Status Pause() override + { + return Status::OK; + } + OHOS::Media::Plugin::Status Resume() override + { + return Status::OK; + } + OHOS::Media::Plugin::Status PushData(const std::string& inPort, std::shared_ptr buffer, + int32_t offset) override + { + (void) inPort; + (void) buffer; + (void) offset; + return Status::OK; + } + OHOS::Media::Plugin::Status SetDataCallback( + std::function)> callback) override + { + (void) callback; + return Status::OK; + } +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DISTRIBUTED_HARDWARE_AVTRANS_INPUT_TEST_H \ No newline at end of file diff --git a/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.cpp new file mode 100644 index 00000000..39749bf6 --- /dev/null +++ b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.cpp @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "avtrans_output_test.h" + +namespace OHOS { +namespace DistributedHardware { + +void AvTransOutputTest::SetUpTestCase() {} + +void AvTransOutputTest::TearDownTestCase() {} + +void AvTransOutputTest::SetUp() +{ + uint32_t pkgVer = 2; + uint32_t apiVer = 2; + std::shared_ptr plugin = std::make_shared(); + transOutput_ = std::make_shared(pkgVer, apiVer, plugin); +} + +void AvTransOutputTest::TearDown() {} + +HWTEST_F(AvTransOutputTest, PushData_001, TestSize.Level0) +{ + std::string inPort = "inPort"; + std::shared_ptr buffer = nullptr; + int32_t offset = 0; + Status ret = transOutput_->PushData(inPort, buffer, offset); + EXPECT_EQ(Status::OK, ret); +} + +HWTEST_F(AvTransOutputTest, SetDataCallback_001, TestSize.Level0) +{ + std::function)> callback = nullptr; + Status ret = transOutput_->SetDataCallback(callback); + EXPECT_EQ(Status::OK, ret); +} +} // namespace DistributedHardware +} // namespace OHOS \ No newline at end of file diff --git a/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.h b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.h new file mode 100644 index 00000000..9fdbfa28 --- /dev/null +++ b/av_transport/av_trans_engine/plugin/test/unittest/core/avtrans_output_test.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OHOS_DISTRIBUTED_HARDWARE_AVTRANS_OUTPUT_TEST_H +#define OHOS_DISTRIBUTED_HARDWARE_AVTRANS_OUTPUT_TEST_H + +#include "gtest/gtest.h" + +#include "avtrans_output.h" + +#include "av_sync_utils.h" +#include "av_trans_buffer.h" +#include "av_trans_constants.h" +#include "av_trans_meta.h" +#include "av_trans_types.h" +#include "av_trans_utils.h" +#include "avtrans_output_plugin.h" +#include "nlohmann/json.hpp" +#include "plugin_manager.h" +#include "plugin_types.h" + +namespace OHOS { +namespace DistributedHardware { +using namespace testing::ext; +using namespace std; +class AvTransOutputTest : public testing::Test { +public: + AvTransOutputTest() {} + ~AvTransOutputTest() {} + + static void SetUpTestCase(void); + static void TearDownTestCase(void); + void SetUp(); + void TearDown(); + std::shared_ptr transOutput = nullptr; +}; +class AvTransOutputPluginTest : public AvTransOutputPlugin { +public: + AvTransOutputPluginTest() = default; + ~AvTransOutputPluginTest() = default; + OHOS::Media::Plugin::Status PushData(const std::string& inPort, std::shared_ptr buffer, + int32_t offset) override + { + (void) inPort; + (void) buffer; + (void) offset; + return Status::OK; + } + OHOS::Media::Plugin::Status SetDataCallback( + std::function)> callback) override + { + (void) callback; + return Status::OK; + } +}; +} // namespace DistributedHardware +} // namespace OHOS +#endif // OHOS_DISTRIBUTED_HARDWARE_AVTRANS_OUTPUT_TEST_H \ No newline at end of file diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/daudio_input_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/daudio_input_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/daudio_input_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/daudio_input_test/BUILD.gn index 0e7bd934..034c922b 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_input/daudio_input_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/daudio_input_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/daudio_input_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/daudio_input_test/daudio_input_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/daudio_input_test/daudio_input_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/daudio_input_test/daudio_input_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/daudio_input_test/daudio_input_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/daudio_input_test/daudio_input_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/daudio_input_test/daudio_input_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/daudio_input_test/daudio_input_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/daudio_input_test/daudio_input_test.h diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dscreen_input_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dscreen_input_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dscreen_input_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dscreen_input_test/BUILD.gn index 19bd5140..9ce1dbe2 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_input/dscreen_input_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dscreen_input_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/dscreen_input_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dscreen_input_test/dscreen_input_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dscreen_input_test/dscreen_input_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dscreen_input_test/dscreen_input_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dscreen_input_test/dscreen_input_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dscreen_input_test/dscreen_input_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dscreen_input_test/dscreen_input_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dscreen_input_test/dscreen_input_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dscreen_input_test/dscreen_input_test.h diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_audio_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_audio_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_audio_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_audio_test/BUILD.gn index 7aae125d..165e6eff 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_audio_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_audio_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/dsoftbus_input_audio_plugin_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_audio_test/dsoftbus_input_audio_plugin_test.h diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_test/BUILD.gn index b986fd15..7f43975b 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/dsoftbus_input_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_input/dsoftbus_input_test/dsoftbus_input_plugin_test.h diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/daudio_output_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/daudio_output_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/daudio_output_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/daudio_output_test/BUILD.gn index ee8db272..1dd2bd71 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_output/daudio_output_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/daudio_output_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/daudio_output_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/daudio_output_test/daudio_output_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/daudio_output_test/daudio_output_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/daudio_output_test/daudio_output_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/daudio_output_test/daudio_output_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/daudio_output_test/daudio_output_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/daudio_output_test/daudio_output_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/daudio_output_test/daudio_output_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/daudio_output_test/daudio_output_test.h diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dscreen_output_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dscreen_output_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dscreen_output_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dscreen_output_test/BUILD.gn index 84c4948c..a1c698e2 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_output/dscreen_output_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dscreen_output_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/dscreen_output_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dscreen_output_test/dscreen_output_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dscreen_output_test/dscreen_output_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dscreen_output_test/dscreen_output_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dscreen_output_test/dscreen_output_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dscreen_output_test/dscreen_output_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dscreen_output_test/dscreen_output_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dscreen_output_test/dscreen_output_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dscreen_output_test/dscreen_output_test.h diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_audio_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_audio_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_audio_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_audio_test/BUILD.gn index 6d3aad0f..805cee81 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_audio_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_audio_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/dsoftbus_output_audio_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_audio_test/dsoftbus_output_audio_plugin_test.h diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_test/BUILD.gn b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_test/BUILD.gn similarity index 97% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_test/BUILD.gn rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_test/BUILD.gn index d5f0bbc9..dbfa26e8 100644 --- a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_test/BUILD.gn +++ b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_test/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -import("../../../../../distributed_av_transport.gni") +import("../../../../../../../distributed_av_transport.gni") module_out_path = "distributed_hardware_fwk/dsoftbus_output_test" diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.cpp b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.cpp similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.cpp rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.cpp diff --git a/av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.h b/av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.h similarity index 100% rename from av_transport/av_trans_engine/plugin/test/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.h rename to av_transport/av_trans_engine/plugin/test/unittest/plugins/av_trans_output/dsoftbus_output_test/dsoftbus_output_plugin_test.h diff --git a/bundle.json b/bundle.json index d4b2a75b..6db08a6e 100644 --- a/bundle.json +++ b/bundle.json @@ -119,7 +119,7 @@ "//foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_engine/filters/test:filter_test", "//foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_engine/av_receiver/test/unittest:receiver_test", "//foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_engine/av_sender/test/unittest:sender_test", - "//foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_engine/plugin/test:plugin_test" + "//foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_engine/plugin/test/unittest:plugin_test" ] } } -- Gitee