Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
323fc950
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
323fc950
编写于
9月 18, 2021
作者:
W
wkejing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【communication_lite】【master】XTS_wifisevice测试用例testHandleDeviceConfig优化
Signed-off-by:
N
wkejing
<
wkejing9687@163.com
>
上级
83dc0207
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
5 deletion
+6
-5
communication_lite/wifiservice_hal/src/wifiservice_func_test.c
...nication_lite/wifiservice_hal/src/wifiservice_func_test.c
+6
-5
未找到文件。
communication_lite/wifiservice_hal/src/wifiservice_func_test.c
浏览文件 @
323fc950
...
@@ -390,16 +390,17 @@ LITE_TEST_CASE(WifiServiceFuncTestSuite, testConnectDisConnect, Function | Mediu
...
@@ -390,16 +390,17 @@ LITE_TEST_CASE(WifiServiceFuncTestSuite, testConnectDisConnect, Function | Mediu
LITE_TEST_CASE
(
WifiServiceFuncTestSuite
,
testHandleDeviceConfig
,
Function
|
MediumTest
|
Level2
)
LITE_TEST_CASE
(
WifiServiceFuncTestSuite
,
testHandleDeviceConfig
,
Function
|
MediumTest
|
Level2
)
{
{
int
netId
=
0
;
int
netId
=
0
;
const
char
*
ssid1
=
"XtsTestWifi01"
;
const
char
*
ssid0
=
"TestWifi01"
;
const
char
*
ssid
[
TEST_SSID_COUNT
]
=
{
"XtsTestWifi02"
,
"XtsTestWifi03"
,
"XtsTestWifi04"
,
"XtsTestWifi05"
,
"XtsTestWifi06"
,
"XtsTestWifi07"
,
"XtsTestWifi08"
,
"XtsTestWifi09"
,
"XtsTestWifi10"
};
const
char
*
ssid
[
TEST_SSID_COUNT
]
=
{
"TestWifi02"
,
"TestWifi03"
,
"TestWifi04"
,
"TestWifi05"
,
"TestWifi06"
,
const
char
*
ssid11
=
"XtsTestWifi11"
;
"TestWifi07"
,
"TestWifi08"
,
"TestWifi09"
,
"TestWifi10"
};
const
char
*
ssid10
=
"TestWifi11"
;
const
char
*
info
=
"12345678"
;
const
char
*
info
=
"12345678"
;
unsigned
char
bssid
[
WIFI_MAC_LEN
]
=
{
0xac
,
0x75
,
0x1d
,
0xd8
,
0x55
,
0xc1
};
unsigned
char
bssid
[
WIFI_MAC_LEN
]
=
{
0xac
,
0x75
,
0x1d
,
0xd8
,
0x55
,
0xc1
};
WifiDeviceConfig
config
=
{
0
};
WifiDeviceConfig
config
=
{
0
};
config
.
freq
=
20
;
config
.
freq
=
20
;
config
.
securityType
=
WIFI_SEC_TYPE_SAE
;
config
.
securityType
=
WIFI_SEC_TYPE_SAE
;
config
.
wapiPskType
=
WIFI_PSK_TYPE_ASCII
;
config
.
wapiPskType
=
WIFI_PSK_TYPE_ASCII
;
int
ret
=
strncpy_s
(
config
.
ssid
,
WIFI_MAX_SSID_LEN
,
ssid
1
,
strlen
(
ssid1
));
int
ret
=
strncpy_s
(
config
.
ssid
,
WIFI_MAX_SSID_LEN
,
ssid
0
,
strlen
(
ssid0
));
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
ret
=
strncpy_s
(
config
.
preSharedKey
,
WIFI_MAX_KEY_LEN
,
info
,
strlen
(
info
));
ret
=
strncpy_s
(
config
.
preSharedKey
,
WIFI_MAX_KEY_LEN
,
info
,
strlen
(
info
));
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
...
@@ -423,7 +424,7 @@ LITE_TEST_CASE(WifiServiceFuncTestSuite, testHandleDeviceConfig, Function | Medi
...
@@ -423,7 +424,7 @@ LITE_TEST_CASE(WifiServiceFuncTestSuite, testHandleDeviceConfig, Function | Medi
}
}
}
}
ret
=
strncpy_s
(
config
.
ssid
,
WIFI_MAX_SSID_LEN
,
ssid1
1
,
strlen
(
ssid11
));
ret
=
strncpy_s
(
config
.
ssid
,
WIFI_MAX_SSID_LEN
,
ssid1
0
,
strlen
(
ssid10
));
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
ret
=
strncpy_s
(
config
.
preSharedKey
,
WIFI_MAX_KEY_LEN
,
info
,
strlen
(
info
));
ret
=
strncpy_s
(
config
.
preSharedKey
,
WIFI_MAX_KEY_LEN
,
info
,
strlen
(
info
));
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
TEST_ASSERT_EQUAL_INT
(
WIFI_SUCCESS
,
ret
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录