• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <gtest/gtest.h>
17 #include <hdf_log.h>
18 #include "../../../chip/hdi_service/wifi_vendor_hal_list.h"
19 
20 using namespace testing::ext;
21 using namespace OHOS::HDI::Wlan::Chip::V2_0;
22 
23 namespace WifiVendorHalListTest {
24 class WifiVendorHalListTest : public testing::Test {
25 public:
SetUpTestCase()26     static void SetUpTestCase() {}
TearDownTestCase()27     static void TearDownTestCase() {}
SetUp()28     void SetUp()
29     {
30         std::weak_ptr<IfaceTool> ifaceTool = std::make_shared<IfaceTool>();
31         vendorHalListTest = std::make_shared<WifiVendorHalList>(ifaceTool);
32     }
TearDown()33     void TearDown()
34     {
35         vendorHalListTest.reset();
36     }
37 
GetHalsTest()38     void GetHalsTest()
39     {
40         EXPECT_TRUE(vendorHalListTest->GetHals().size() != 0);
41     }
42 
43 public:
44     std::shared_ptr<WifiVendorHalList> vendorHalListTest;
45 };
46 
47 /**
48  * @tc.name: GetHalsTest
49  * @tc.desc: GetHals
50  * @tc.type: FUNC
51  * @tc.require:
52  */
53 HWTEST_F(WifiVendorHalListTest, GetHalsTest, TestSize.Level1)
54 {
55     HDF_LOGI("GetHalsTest started");
56     GetHalsTest();
57 }
58 }