From 19510847c7b2e4f1a0569316fcd7d6186961fe81 Mon Sep 17 00:00:00 2001 From: w30042960 Date: Sat, 13 Sep 2025 16:15:40 +0800 Subject: [PATCH] add ut Signed-off-by: w30042960 --- .../unittest/audiodata/src/audio_data_test.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/services/common/test/unittest/audiodata/src/audio_data_test.cpp b/services/common/test/unittest/audiodata/src/audio_data_test.cpp index eaa42170..4565e807 100644 --- a/services/common/test/unittest/audiodata/src/audio_data_test.cpp +++ b/services/common/test/unittest/audiodata/src/audio_data_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 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 @@ -152,5 +152,19 @@ HWTEST_F(AudioDataTest, FindString_002, TestSize.Level1) ASSERT_NE(audioData, nullptr); EXPECT_EQ(false, audioData->FindString(name, value)); } + +/** + * @tc.name: GetPtsSpecial_001 + * @tc.desc: Verify the GetPtsSpecial function. + * @tc.type: FUNC + * @tc.require: AR000H0E5U + */ +HWTEST_F(AudioDataTest, GetPtsSpecial_001, TestSize.Level1) +{ + int64_t pts = 0; + ASSERT_NE(audioData, nullptr); + audioData->SetPtsSpecial(pts); + EXPECT_EQ(0, audioData->GetPtsSpecial()); +} } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file -- Gitee