• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #include "audio_common_test.h"
10 #include <gtest/gtest.h>
11 #include "hdf_uhdf_test.h"
12 
13 using namespace testing::ext;
14 
15 namespace {
16 class AudioParseTest : public testing::Test {
17 public:
18     static void SetUpTestCase();
19     static void TearDownTestCase();
20     void SetUp();
21     void TearDown();
22 };
23 
SetUpTestCase()24 void AudioParseTest::SetUpTestCase()
25 {
26     HdfTestOpenService();
27 }
28 
TearDownTestCase()29 void AudioParseTest::TearDownTestCase()
30 {
31     HdfTestCloseService();
32 }
33 
SetUp()34 void AudioParseTest::SetUp()
35 {
36 }
37 
TearDown()38 void AudioParseTest::TearDown()
39 {
40 }
41 
42 HWTEST_F(AudioParseTest, AudioParseTest_AudioFillConfigData, TestSize.Level1)
43 {
44     struct HdfTestMsg msg = {g_testAudioType, TEST_AUDIOFILLCONFIGDATA, -1};
45     EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
46 }
47 
48 HWTEST_F(AudioParseTest, AudioParseTest_CodecGetRegConfig, TestSize.Level1)
49 {
50     struct HdfTestMsg msg = {g_testAudioType, TEST_CODECGETREGCONFIG, -1};
51     EXPECT_EQ(0, HdfTestSendMsgToService(&msg));
52 }
53 }
54