1/* 2 * Copyright (c) 2021 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 <cstdint> 17#include <cstdio> 18#include <cstdlib> 19#include <fcntl.h> 20#include <gtest/gtest.h> 21#include <string> 22#include <unistd.h> 23#include "hdf_io_service_if.h" 24#include "hdf_uhdf_test.h" 25#include "hdf_wifi_test.h" 26 27using namespace testing::ext; 28 29namespace NetBuffTest { 30class WiFiNetBuffTest : public testing::Test { 31public: 32 static void SetUpTestCase(); 33 static void TearDownTestCase(); 34 void SetUp(); 35 void TearDown(); 36}; 37 38void WiFiNetBuffTest::SetUpTestCase() 39{ 40 HdfTestOpenService(); 41} 42 43void WiFiNetBuffTest::TearDownTestCase() 44{ 45 HdfTestCloseService(); 46} 47 48void WiFiNetBuffTest::SetUp() {} 49 50void WiFiNetBuffTest::TearDown() {} 51 52/** 53 * @tc.name: WiFiNetBuff001 54 * @tc.desc: netbuf function test 55 * @tc.type: FUNC 56 * @tc.require: AR000F869I 57 */ 58HWTEST_F(WiFiNetBuffTest, WiFiNetBuff001, TestSize.Level1) 59{ 60 struct HdfTestMsg msg = {TEST_WIFI_TYPE, WIFI_NET_BUF_TEST, -1}; 61 EXPECT_EQ(0, HdfTestSendMsgToService(&msg)); 62} 63 64/** 65 * @tc.name: WiFiNetBuffQueue001 66 * @tc.desc: netbuf queue function test 67 * @tc.type: FUNC 68 * @tc.require: AR000F869I 69 */ 70HWTEST_F(WiFiNetBuffTest, WiFiNetBuffQueue001, TestSize.Level1) 71{ 72 struct HdfTestMsg msg = {TEST_WIFI_TYPE, WIFI_NET_BUF_QUEUE_TEST, -1}; 73 EXPECT_EQ(0, HdfTestSendMsgToService(&msg)); 74} 75}; 76