mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-12-23 23:37:42 +00:00
tdd
Signed-off-by: sunjingqiang <17319862417@163.com>
This commit is contained in:
parent
08bca8f8d1
commit
6aac87ab7f
@ -177,14 +177,14 @@ HWTEST_F(IWifiIfaceTest, CreateIface, TestSize.Level1)
|
||||
{
|
||||
int32_t id = 0;
|
||||
IWifiIface iface;
|
||||
CreateIface(id,&iface);
|
||||
CreateIface(id, &iface);
|
||||
}
|
||||
|
||||
HWTEST_F(IWifiIfaceTest, GetIface, TestSize.Level1)
|
||||
{
|
||||
char ifname[] = "wifitest";
|
||||
IWifiIface iface;
|
||||
GetIface(ifname,&iface);
|
||||
GetIface(ifname, &iface);
|
||||
}
|
||||
|
||||
HWTEST_F(IWifiIfaceTest, GetIfaceNames, TestSize.Level1)
|
||||
@ -192,13 +192,13 @@ HWTEST_F(IWifiIfaceTest, GetIfaceNames, TestSize.Level1)
|
||||
int32_t type = 0;
|
||||
char ifname[] = "wifitest";
|
||||
int32_t size = 1;
|
||||
GetIfaceNames(type,ifname,size);
|
||||
GetIfaceNames(type, ifname, size);
|
||||
}
|
||||
|
||||
HWTEST_F(IWifiIfaceTest, RemoveIface, TestSize.Level1)
|
||||
{
|
||||
char ifname[] = "wifitest";
|
||||
RemoveIface(fname);
|
||||
RemoveIface(ifname);
|
||||
}
|
||||
|
||||
HWTEST_F(IWifiIfaceTest, ConfigComboModes, TestSize.Level1)
|
||||
|
@ -1257,29 +1257,29 @@ HWTEST_F(WifiIdlClientTest, ReqP2pStartTest, TestSize.Level1)
|
||||
HWTEST_F(WifiIdlClientTest, ReqP2pSetDeviceNameTest, TestSize.Level1)
|
||||
{
|
||||
std::string name = "10.26.120.74";
|
||||
mClient.ReqP2pSetDeviceName(&name);
|
||||
mClient.ReqP2pSetDeviceName(name);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiIdlClientTest, ReqP2pSetSsidPostfixNameTest, TestSize.Level1)
|
||||
{
|
||||
std::string postfixName = "10.26.120.74";
|
||||
mClient.ReqP2pSetSsidPostfixName(&postfixName);
|
||||
mClient.ReqP2pSetSsidPostfixName(postfixName);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiIdlClientTest, ReqP2pSetWpsConfigMethodsTest, TestSize.Level1)
|
||||
{
|
||||
std::string config = "10.26.120.74";
|
||||
mClient.ReqP2pSetWpsConfigMethods(&config);
|
||||
mClient.ReqP2pSetWpsConfigMethods(config);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiIdlClientTest, ReqP2pFlushTest, TestSize.Level1)
|
||||
{
|
||||
mClient.ReqP2pFlush(&config);
|
||||
mClient.ReqP2pFlush();
|
||||
}
|
||||
|
||||
HWTEST_F(WifiIdlClientTest, ReqP2pFlushServiceTest, TestSize.Level1)
|
||||
{
|
||||
mClient.ReqP2pFlushService(&config);
|
||||
mClient.ReqP2pFlushService();
|
||||
}
|
||||
|
||||
HWTEST_F(WifiIdlClientTest, ReqWpaSetPowerModeTest, TestSize.Level1)
|
||||
|
@ -63,7 +63,6 @@ ohos_unittest("manager_unittest") {
|
||||
"wifi_country_code_policy_test.cpp",
|
||||
"wifi_dumper_test.cpp",
|
||||
"wifi_internal_event_dispatcher_test.cpp",
|
||||
"wifi_power_state_listener_test.cpp",
|
||||
"wifi_protect_test.cpp",
|
||||
"wifi_service_manager_test.cpp",
|
||||
"wifi_settings_test.cpp",
|
||||
|
@ -80,7 +80,7 @@ HWTEST_F(ArpCheckerTest, DoDnsCheck_Test, TestSize.Level1)
|
||||
pDnsChecker->DoDnsCheck(hostAddress, 1);
|
||||
}
|
||||
|
||||
HWTEST_F(ArpCheckerTest,recvDnsData_Test, TestSize.Level1)
|
||||
HWTEST_F(ArpCheckerTest, recvDnsData_Test, TestSize.Level1)
|
||||
{
|
||||
std::string hostAddress = "192.168.3.66";
|
||||
pDnsChecker->recvDnsData(hostAddress, 1, 0);
|
||||
|
@ -316,12 +316,11 @@ HWTEST_F(WifiHalP2pInterfaceTest, P2pGetPeerTest, TestSize.Level1)
|
||||
P2pDeviceInfo peerInfo;
|
||||
EXPECT_TRUE(P2pGetPeer(NULL, NULL) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pGetPeer(type, NULL) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pGetPeer(type, &peerInfo) == WIFI_HAL_SUCCESS);
|
||||
EXPECT_TRUE(P2pGetPeer(type, &peerInfo) == WIFI_HAL_FAILED);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiHalP2pInterfaceTest, P2pGetFrequenciesTest, TestSize.Level1)
|
||||
{
|
||||
char type[] = "P2pGetPeer";
|
||||
int peerInfo = 1;
|
||||
int frequencies = 0;
|
||||
EXPECT_TRUE(P2pGetFrequencies(0, NULL, NULL) == WIFI_HAL_FAILED);
|
||||
@ -333,25 +332,25 @@ HWTEST_F(WifiHalP2pInterfaceTest, P2pSetGroupConfigTest, TestSize.Level1)
|
||||
{
|
||||
P2pGroupConfig pConfig;
|
||||
int size = 1;
|
||||
EXPECT_TRUE(P2pSetGroupConfig(0, NULL, NULL) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pSetGroupConfig(0, NULL, 0) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pSetGroupConfig(0, &pConfig, 0) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pSetGroupConfig(1, &pConfig, size) == WIFI_HAL_SUCCESS);
|
||||
EXPECT_TRUE(P2pSetGroupConfig(1, &pConfig, size) == WIFI_HAL_FAILED);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiHalP2pInterfaceTest, P2pGetGroupConfigTest, TestSize.Level1)
|
||||
{
|
||||
P2pGroupConfig pConfig;
|
||||
int size = 1;
|
||||
EXPECT_TRUE(P2pGetGroupConfig(0, NULL, NULL) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pGetGroupConfig(0, NULL, 0) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pGetGroupConfig(0, &pConfig, 0) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pGetGroupConfig(1, &pConfig, size) == WIFI_HAL_SUCCESS);
|
||||
EXPECT_TRUE(P2pGetGroupConfig(1, &pConfig, size) == WIFI_HAL_FAILED);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiHalP2pInterfaceTest, P2pHid2dConnectTest, TestSize.Level1)
|
||||
{
|
||||
Hid2dConnectInfo info;
|
||||
EXPECT_TRUE(P2pHid2dConnect( NULL) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pHid2dConnect(&info) == WIFI_HAL_SUCCESS);
|
||||
EXPECT_TRUE(P2pHid2dConnect(NULL) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(P2pHid2dConnect(&info) == WIFI_HAL_FAILED);
|
||||
}
|
||||
} // namespace Wifi
|
||||
} // namespace OHOS
|
@ -211,11 +211,6 @@ HWTEST_F(WifiHalStaInterfaceTest, ForceStopTest, TestSize.Level1)
|
||||
EXPECT_TRUE(ForceStop() == WIFI_HAL_SUCCESS);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiHalStaInterfaceTest, ForceStopTest, TestSize.Level1)
|
||||
{
|
||||
EXPECT_TRUE(ForceStop() == WIFI_HAL_SUCCESS);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiHalStaInterfaceTest, GetStaCapabilitiesTest, TestSize.Level1)
|
||||
{
|
||||
unsigned char mac[] = "lenMac";
|
||||
@ -234,7 +229,7 @@ HWTEST_F(WifiHalStaInterfaceTest, GetFrequenciesTest, TestSize.Level1)
|
||||
HWTEST_F(WifiHalStaInterfaceTest, SetAssocMacAddrTest, TestSize.Level1)
|
||||
{
|
||||
int frequencies = 1;
|
||||
EXPECT_TRUE(SetAssocMacAddr(NULL, 0, frequencies) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(SetAssocMacAddr(NULL, frequencies) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(SetScanningMacAddress(NULL, frequencies) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(DeauthLastRoamingBssid(NULL, frequencies) == WIFI_HAL_FAILED);
|
||||
}
|
||||
@ -242,20 +237,21 @@ HWTEST_F(WifiHalStaInterfaceTest, SetAssocMacAddrTest, TestSize.Level1)
|
||||
HWTEST_F(WifiHalStaInterfaceTest, GetSupportFeatureTest, TestSize.Level1)
|
||||
{
|
||||
int frequencies = 1;
|
||||
EXPECT_TRUE(GetSupportFeature(&frequencies) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(GetSupportFeature(NULL) == WIFI_HAL_FAILED);
|
||||
EXPECT_GE(GetSupportFeature(&frequencies), WIFI_HAL_FAILED);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiHalStaInterfaceTest, RunCmdTest, TestSize.Level1)
|
||||
{
|
||||
int32_t cmdid = 1;
|
||||
unsigned char mac[] = "lenMac";
|
||||
char mac[] = "lenMac";
|
||||
EXPECT_TRUE(RunCmd(NULL, cmdid, NULL, 1) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(RunCmd(mac, cmdid, NULL, 1) == WIFI_HAL_FAILED);
|
||||
}
|
||||
|
||||
HWTEST_F(WifiHalStaInterfaceTest, SetPowerModeTest, TestSize.Level1)
|
||||
{
|
||||
EXPECT_TRUE(SetPowerMode(true) == WIFI_HAL_FAILED);
|
||||
EXPECT_TRUE(SetPowerMode(true) == WIFI_HAL_SUCCESS);
|
||||
}
|
||||
} // namespace Wifi
|
||||
} // namespace OHOS
|
Loading…
Reference in New Issue
Block a user