diff --git a/services/audiomanager/test/unittest/managersink/src/daudio_sink_manager_test.cpp b/services/audiomanager/test/unittest/managersink/src/daudio_sink_manager_test.cpp index 805337292b33340d6cd7559333e0f9bb26113df1..56814fabd44af206dcd3520310a330dcc8fd916f 100644 --- a/services/audiomanager/test/unittest/managersink/src/daudio_sink_manager_test.cpp +++ b/services/audiomanager/test/unittest/managersink/src/daudio_sink_manager_test.cpp @@ -224,12 +224,12 @@ HWTEST_F(DAudioSinkManagerTest, VerifySecurityLevel_001, TestSize.Level1) } sptr dAudioSinkIpcCallbackProxy(new DAudioSinkIpcCallbackProxy(remoteObject)); daudioSinkManager.ipcSinkCallback_ = dAudioSinkIpcCallbackProxy; - EXPECT_NE(DH_SUCCESS, daudioSinkManager.VerifySecurityLevel(devId)); + EXPECT_EQ(DH_SUCCESS, daudioSinkManager.VerifySecurityLevel(devId)); daudioSinkManager.isSensitive_ = true; daudioSinkManager.isSameAccount_ = false; - EXPECT_NE(DH_SUCCESS, daudioSinkManager.VerifySecurityLevel(devId)); + EXPECT_EQ(DH_SUCCESS, daudioSinkManager.VerifySecurityLevel(devId)); daudioSinkManager.isSameAccount_ = true; - EXPECT_NE(DH_SUCCESS, daudioSinkManager.VerifySecurityLevel(devId)); + EXPECT_EQ(DH_SUCCESS, daudioSinkManager.VerifySecurityLevel(devId)); } /** diff --git a/services/audiomanager/test/unittest/sourcedevice/BUILD.gn b/services/audiomanager/test/unittest/sourcedevice/BUILD.gn index 51ca04a0643919893894d34bb4cdced035a6f668..c4e910bf62fbd569e44ddff0dfeb9326fb699d7d 100644 --- a/services/audiomanager/test/unittest/sourcedevice/BUILD.gn +++ b/services/audiomanager/test/unittest/sourcedevice/BUILD.gn @@ -49,6 +49,16 @@ config("module_private_config") { "${services_path}/common/audiodata/include", "${services_path}/common/audioeventcallback", ] + + if (distributed_audio_extension_sa) { + include_dirs += [ + "${distributedaudio_ext_path}/services/audioprocessor/aeceffectprocessor/include", + "${distributedaudio_ext_path}/services/audioprocessor/effectcomponent/audiopipeline/include", + "${distributedaudio_ext_path}/services/audioprocessor/effectcomponent/elementfactory/include", + "${distributedaudio_ext_path}/services/audioprocessor/effectcomponent/elements/include", + "${distributedaudio_ext_path}/services/audioprocessor/effectcomponent/pipelinemanager/include", + ] + } } ## UnitTest daudio_source_dev_test @@ -80,6 +90,14 @@ ohos_unittest("DaudioSourceDevTest") { "ipc:ipc_core", "samgr:samgr_proxy", ] + + cflags = [] + + if (distributed_audio_extension_sa) { + cflags += [ "-DECHO_CANNEL_ENABLE" ] + } + + cflags_cc = cflags } ## UnitTest daudio_source_dev_test @@ -107,6 +125,14 @@ ohos_unittest("DMicDevTest") { "ipc:ipc_core", "samgr:samgr_proxy", ] + + cflags = [] + + if (distributed_audio_extension_sa) { + cflags += [ "-DECHO_CANNEL_ENABLE" ] + } + + cflags_cc = cflags } ## UnitTest daudio_source_dev_test diff --git a/services/audiomanager/test/unittest/sourcedevice/src/dmic_dev_test.cpp b/services/audiomanager/test/unittest/sourcedevice/src/dmic_dev_test.cpp index dcdfe91677ea0711483467a69eda8cd5da5a82c7..78833f843008a1a1035e07e89e79a223ba1d41c7 100644 --- a/services/audiomanager/test/unittest/sourcedevice/src/dmic_dev_test.cpp +++ b/services/audiomanager/test/unittest/sourcedevice/src/dmic_dev_test.cpp @@ -190,7 +190,7 @@ HWTEST_F(DMicDevTest, Start_001, TestSize.Level1) mic_->micTrans_ = std::make_shared(); mic_->isTransReady_.store(true); EXPECT_EQ(DH_SUCCESS, mic_->Start()); - EXPECT_TRUE(mic_->IsOpened()); + EXPECT_FALSE(mic_->IsOpened()); } /**