Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d5d41f2c
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看板
未验证
提交
d5d41f2c
编写于
6月 14, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3541 电话netmanager_socket用例修改
Merge pull request !3541 from 高曦/OpenHarmony-3.1-Release
上级
aabd586b
79a0a860
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
56 addition
and
335 deletion
+56
-335
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/SocketJsunit.test.ets
...ager_socket/entry/src/main/ets/test/SocketJsunit.test.ets
+56
-335
未找到文件。
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/test/SocketJsunit.test.ets
浏览文件 @
d5d41f2c
...
@@ -387,11 +387,7 @@ export default function socketJsunit() {
...
@@ -387,11 +387,7 @@ export default function socketJsunit() {
it('Telephony_Socket_UDPSocket_bind_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_bind_0200', 0, function (done) {
let caseName = "Telephony_Socket_UDPSocket_bind_0200"
let caseName = "Telephony_Socket_UDPSocket_bind_0200"
console.log("************* Telephony_Socket_UDPSocket_bind_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_bind_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let netAddress: socket.NetAddress = {
let netAddress: socket.NetAddress = {
address: "test address",
address: "test address",
family: 1,
family: 1,
...
@@ -446,12 +442,7 @@ export default function socketJsunit() {
...
@@ -446,12 +442,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_bind_0400', 0, function (done) {
it('Telephony_Socket_UDPSocket_bind_0400', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_bind_0400 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_bind_0400 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_bind_0400"
let caseName = "Telephony_Socket_UDPSocket_bind_0400"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let netAddress = {
let netAddress = {
address: "third test address",
address: "third test address",
family: 3,
family: 3,
...
@@ -475,12 +466,7 @@ export default function socketJsunit() {
...
@@ -475,12 +466,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_send_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_send_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_send_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_send_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_send_0100"
let caseName = "Telephony_Socket_UDPSocket_send_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let udpSendOptions = {
let udpSendOptions = {
data: "test data",
data: "test data",
address: {
address: {
...
@@ -510,12 +496,7 @@ export default function socketJsunit() {
...
@@ -510,12 +496,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_send_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_send_0200', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_send_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_send_0200 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_send_0200"
let caseName = "Telephony_Socket_UDPSocket_send_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let udpSendOptions = {
let udpSendOptions = {
data: "test data",
data: "test data",
address: {
address: {
...
@@ -540,12 +521,7 @@ export default function socketJsunit() {
...
@@ -540,12 +521,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_send_0300', 0, function (done) {
it('Telephony_Socket_UDPSocket_send_0300', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_send_0300 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_send_0300 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_send_0300"
let caseName = "Telephony_Socket_UDPSocket_send_0300"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let udpSendOptions = {
let udpSendOptions = {
data: "test data",
data: "test data",
address: {
address: {
...
@@ -573,12 +549,7 @@ export default function socketJsunit() {
...
@@ -573,12 +549,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_send_0400', 0, function (done) {
it('Telephony_Socket_UDPSocket_send_0400', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_send_0400 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_send_0400 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_send_0400"
let caseName = "Telephony_Socket_UDPSocket_send_0400"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let udpSendOptions = {
let udpSendOptions = {
data: "test data",
data: "test data",
address: {
address: {
...
@@ -601,12 +572,7 @@ export default function socketJsunit() {
...
@@ -601,12 +572,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_close_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_close_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_close_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_close_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_close_0100"
let caseName = "Telephony_Socket_UDPSocket_close_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.close((error, data) => {
udp.close((error, data) => {
if (error) {
if (error) {
console.log(`${caseName} error, case success,error:${toString(error)}`);
console.log(`${caseName} error, case success,error:${toString(error)}`);
...
@@ -627,12 +593,7 @@ export default function socketJsunit() {
...
@@ -627,12 +593,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_close_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_close_0200', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_close_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_close_0200 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_close_0200"
let caseName = "Telephony_Socket_UDPSocket_close_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.close().then(data => {
udp.close().then(data => {
console.log(`${caseName} success,data:${toString(data)}`);
console.log(`${caseName} success,data:${toString(data)}`);
}).catch((error) => {
}).catch((error) => {
...
@@ -649,12 +610,7 @@ export default function socketJsunit() {
...
@@ -649,12 +610,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_getState_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_getState_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_getState_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_getState_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_getState_0100"
let caseName = "Telephony_Socket_UDPSocket_getState_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.getState((error, data) => {
udp.getState((error, data) => {
if (error) {
if (error) {
console.log(`${caseName} error, case success,error:${toString(error)}`);
console.log(`${caseName} error, case success,error:${toString(error)}`);
...
@@ -676,12 +632,7 @@ export default function socketJsunit() {
...
@@ -676,12 +632,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_getState_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_getState_0200', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_getState_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_getState_0200 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_getState_0200"
let caseName = "Telephony_Socket_UDPSocket_getState_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.getState().then(data => {
udp.getState().then(data => {
console.log(`${caseName} success,data:${toString(data)}`);
console.log(`${caseName} success,data:${toString(data)}`);
}).catch((error) => {
}).catch((error) => {
...
@@ -699,12 +650,7 @@ export default function socketJsunit() {
...
@@ -699,12 +650,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_setExtraOptions_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_setExtraOptions_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_setExtraOptions_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_setExtraOptions_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_setExtraOptions_0100"
let caseName = "Telephony_Socket_UDPSocket_setExtraOptions_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let udpExtraOptions = {
let udpExtraOptions = {
broadcast: true
broadcast: true
}
}
...
@@ -761,12 +707,7 @@ export default function socketJsunit() {
...
@@ -761,12 +707,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_setExtraOptions_0300', 0, function (done) {
it('Telephony_Socket_UDPSocket_setExtraOptions_0300', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_setExtraOptions_0300 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_setExtraOptions_0300 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_setExtraOptions_0300"
let caseName = "Telephony_Socket_UDPSocket_setExtraOptions_0300"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let udpExtraOptions = {}
let udpExtraOptions = {}
udp.setExtraOptions(udpExtraOptions, (error) => {
udp.setExtraOptions(udpExtraOptions, (error) => {
if (error) {
if (error) {
...
@@ -813,12 +754,7 @@ export default function socketJsunit() {
...
@@ -813,12 +754,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_on_message_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_on_message_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_on_message_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_on_message_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_on_message_0100"
let caseName = "Telephony_Socket_UDPSocket_on_message_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.on('message', (data) => {
udp.on('message', (data) => {
let socketRemoteInfo = data.remoteInfo;
let socketRemoteInfo = data.remoteInfo;
console.log(`${caseName} port:${socketRemoteInfo.port}`);
console.log(`${caseName} port:${socketRemoteInfo.port}`);
...
@@ -835,12 +771,7 @@ export default function socketJsunit() {
...
@@ -835,12 +771,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_off_message_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_message_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_message_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_message_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_off_message_0100"
let caseName = "Telephony_Socket_UDPSocket_off_message_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("message", data => {
udp.off("message", data => {
let socketRemoteInfo = data.remoteInfo;
let socketRemoteInfo = data.remoteInfo;
console.log(`${caseName} port:${socketRemoteInfo.port}`);
console.log(`${caseName} port:${socketRemoteInfo.port}`);
...
@@ -856,12 +787,7 @@ export default function socketJsunit() {
...
@@ -856,12 +787,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for message receiving events of the UDPSocket connection.
* @tc.desc : Cancels listening for message receiving events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_off_message_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_message_0200', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_message_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_message_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("message");
udp.off("message");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_UDPSocket_off_message_0200 Test end*************");
console.log("************* Telephony_Socket_UDPSocket_off_message_0200 Test end*************");
...
@@ -874,12 +800,7 @@ export default function socketJsunit() {
...
@@ -874,12 +800,7 @@ export default function socketJsunit() {
* @tc.desc : Listens for data packet message events or close events of the UDPSocket connection.
* @tc.desc : Listens for data packet message events or close events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_on_listening_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_on_listening_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_on_listening_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_on_listening_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.on("listening", data => {
udp.on("listening", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -893,12 +814,7 @@ export default function socketJsunit() {
...
@@ -893,12 +814,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_off_listening_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_listening_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_listening_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_listening_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("listening", data => {
udp.off("listening", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -912,12 +828,7 @@ export default function socketJsunit() {
...
@@ -912,12 +828,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_off_listening_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_listening_0200', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_listening_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_listening_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("listening");
udp.off("listening");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_UDPSocket_off_listening_0200 Test end*************");
console.log("************* Telephony_Socket_UDPSocket_off_listening_0200 Test end*************");
...
@@ -930,12 +841,7 @@ export default function socketJsunit() {
...
@@ -930,12 +841,7 @@ export default function socketJsunit() {
* @tc.desc : Listens for data packet message events or close events of the UDPSocket connection.
* @tc.desc : Listens for data packet message events or close events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_on_close_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_on_close_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_on_close_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_on_close_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.on("close", data => {
udp.on("close", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -949,12 +855,7 @@ export default function socketJsunit() {
...
@@ -949,12 +855,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_off_close_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_close_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_close_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_close_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("close", data => {
udp.off("close", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -968,12 +869,7 @@ export default function socketJsunit() {
...
@@ -968,12 +869,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
* @tc.desc : Cancels listening for data packet message events or close events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_off_close_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_close_0200', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_close_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_close_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("close");
udp.off("close");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_UDPSocket_off_close_0200 Test end*************");
console.log("************* Telephony_Socket_UDPSocket_off_close_0200 Test end*************");
...
@@ -987,12 +883,7 @@ export default function socketJsunit() {
...
@@ -987,12 +883,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_on_error_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_on_error_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_on_error_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_on_error_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_on_error_0100"
let caseName = "Telephony_Socket_UDPSocket_on_error_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.on("error", error => {
udp.on("error", error => {
console.log(`${caseName} fail, error:${toString(error)}`);
console.log(`${caseName} fail, error:${toString(error)}`);
expect().assertFail();
expect().assertFail();
...
@@ -1009,12 +900,7 @@ export default function socketJsunit() {
...
@@ -1009,12 +900,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_UDPSocket_off_error_0100', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_error_0100', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_error_0100 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_error_0100 Test start*************");
let caseName = "Telephony_Socket_UDPSocket_off_error_0100"
let caseName = "Telephony_Socket_UDPSocket_off_error_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("error", error => {
udp.off("error", error => {
console.log(`${caseName} fail, error:${toString(error)}`);
console.log(`${caseName} fail, error:${toString(error)}`);
expect().assertFail();
expect().assertFail();
...
@@ -1030,12 +916,7 @@ export default function socketJsunit() {
...
@@ -1030,12 +916,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for error events of the UDPSocket connection.
* @tc.desc : Cancels listening for error events of the UDPSocket connection.
*/
*/
it('Telephony_Socket_UDPSocket_off_error_0200', 0, function (done) {
it('Telephony_Socket_UDPSocket_off_error_0200', 0, function (done) {
console.log("************* Telephony_Socket_UDPSocket_off_error_0200 Test start*************");
console.log("************* Telephony_Socket_UDPSocket_off_error_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
udp.off("error");
udp.off("error");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_UDPSocket_off_error_0200 Test end*************");
console.log("************* Telephony_Socket_UDPSocket_off_error_0200 Test end*************");
...
@@ -1076,12 +957,7 @@ export default function socketJsunit() {
...
@@ -1076,12 +957,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_bind_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_bind_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_bind_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_bind_0200 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_bind_0200"
let caseName = "Telephony_Socket_TCPSocket_bind_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let netAddress = {
let netAddress = {
address: "test address",
address: "test address",
family: 1,
family: 1,
...
@@ -1131,11 +1007,7 @@ export default function socketJsunit() {
...
@@ -1131,11 +1007,7 @@ export default function socketJsunit() {
it('Telephony_Socket_TCPSocket_bind_0400', 0, function (done) {
it('Telephony_Socket_TCPSocket_bind_0400', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_bind_0400 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_bind_0400 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_bind_0400"
let caseName = "Telephony_Socket_TCPSocket_bind_0400"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let netAddress = {
let netAddress = {
address: "third test address"
address: "third test address"
}
}
...
@@ -1157,12 +1029,7 @@ export default function socketJsunit() {
...
@@ -1157,12 +1029,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_send_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_send_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_send_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_send_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_send_0100"
let caseName = "Telephony_Socket_TCPSocket_send_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpSendOptions = {
let tcpSendOptions = {
data: "test data",
data: "test data",
encoding: "test encoding"
encoding: "test encoding"
...
@@ -1188,12 +1055,7 @@ export default function socketJsunit() {
...
@@ -1188,12 +1055,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_send_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_send_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_send_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_send_0200 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_send_0200"
let caseName = "Telephony_Socket_TCPSocket_send_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpSendOptions = {
let tcpSendOptions = {
data: "test data",
data: "test data",
encoding: "test encoding"
encoding: "test encoding"
...
@@ -1214,12 +1076,7 @@ export default function socketJsunit() {
...
@@ -1214,12 +1076,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_send_0300', 0, function (done) {
it('Telephony_Socket_TCPSocket_send_0300', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_send_0300 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_send_0300 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_send_0300"
let caseName = "Telephony_Socket_TCPSocket_send_0300"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpSendOptions = {
let tcpSendOptions = {
data: "second test data",
data: "second test data",
}
}
...
@@ -1244,12 +1101,7 @@ export default function socketJsunit() {
...
@@ -1244,12 +1101,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_send_0400', 0, function (done) {
it('Telephony_Socket_TCPSocket_send_0400', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_send_0400 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_send_0400 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_send_0400"
let caseName = "Telephony_Socket_TCPSocket_send_0400"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpSendOptions = {
let tcpSendOptions = {
data: "second test data",
data: "second test data",
}
}
...
@@ -1269,12 +1121,7 @@ export default function socketJsunit() {
...
@@ -1269,12 +1121,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_connect_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_connect_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_connect_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_connect_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_connect_0100"
let caseName = "Telephony_Socket_TCPSocket_connect_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpConnectOptions = {
let tcpConnectOptions = {
address: {
address: {
address: "test address",
address: "test address",
...
@@ -1304,12 +1151,7 @@ export default function socketJsunit() {
...
@@ -1304,12 +1151,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_connect_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_connect_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_connect_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_connect_0200 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_connect_0200"
let caseName = "Telephony_Socket_TCPSocket_connect_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpConnectOptions = {
let tcpConnectOptions = {
address: {
address: {
address: "test address",
address: "test address",
...
@@ -1334,12 +1176,7 @@ export default function socketJsunit() {
...
@@ -1334,12 +1176,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_connect_0300', 0, function (done) {
it('Telephony_Socket_TCPSocket_connect_0300', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_connect_0300 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_connect_0300 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_connect_0300"
let caseName = "Telephony_Socket_TCPSocket_connect_0300"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpConnectOptions = {
let tcpConnectOptions = {
address: {
address: {
address: "second test address",
address: "second test address",
...
@@ -1368,12 +1205,7 @@ export default function socketJsunit() {
...
@@ -1368,12 +1205,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_connect_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_connect_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_connect_0400 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_connect_0400 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_connect_0400"
let caseName = "Telephony_Socket_TCPSocket_connect_0400"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpConnectOptions = {
let tcpConnectOptions = {
address: {
address: {
address: "second test address",
address: "second test address",
...
@@ -1397,12 +1229,7 @@ export default function socketJsunit() {
...
@@ -1397,12 +1229,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_close_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_close_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_close_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_close_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_close_0100"
let caseName = "Telephony_Socket_TCPSocket_close_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.close((error, data) => {
tcp.close((error, data) => {
if (error) {
if (error) {
console.log(`${caseName} error, case success,error:${toString(error)}`);
console.log(`${caseName} error, case success,error:${toString(error)}`);
...
@@ -1423,12 +1250,7 @@ export default function socketJsunit() {
...
@@ -1423,12 +1250,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_close_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_close_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_close_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_close_0200 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_close_0200"
let caseName = "Telephony_Socket_TCPSocket_close_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.close().then(data => {
tcp.close().then(data => {
console.log(`${caseName} success,data:${toString(data)}`);
console.log(`${caseName} success,data:${toString(data)}`);
}).catch((error) => {
}).catch((error) => {
...
@@ -1445,12 +1267,7 @@ export default function socketJsunit() {
...
@@ -1445,12 +1267,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_getState_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_getState_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_getState_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_getState_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_getState_0100"
let caseName = "Telephony_Socket_TCPSocket_getState_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.getState((error, data) => {
tcp.getState((error, data) => {
if (error) {
if (error) {
console.log(`${caseName} case success,error:${toString(error)}`);
console.log(`${caseName} case success,error:${toString(error)}`);
...
@@ -1472,18 +1289,12 @@ export default function socketJsunit() {
...
@@ -1472,18 +1289,12 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_getState_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_getState_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_getState_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_getState_0200 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_getState_0200"
let caseName = "Telephony_Socket_TCPSocket_getState_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.getState().then(data => {
tcp.getState().then(data => {
console.log(`${caseName} success,data:${toString(data)}`);
console.log(`${caseName} success,data:${toString(data)}`);
}).catch((error) => {
}).catch((error) => {
console.log(`${caseName} failed,error:${toString(error)}`);
console.log(`${caseName} failed,error:${toString(error)}`);
});
});
console.log("************* Telephony_Socket_TCPSocket_getState_0200 Test end*************");
console.log("************* Telephony_Socket_TCPSocket_getState_0200 Test end*************");
done();
done();
});
});
...
@@ -1495,12 +1306,7 @@ export default function socketJsunit() {
...
@@ -1495,12 +1306,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_setExtraOptions_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_setExtraOptions_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0100"
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpExtraOptions = {
let tcpExtraOptions = {
keepAlive: true,
keepAlive: true,
OOBInline: true,
OOBInline: true,
...
@@ -1531,12 +1337,7 @@ export default function socketJsunit() {
...
@@ -1531,12 +1337,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_setExtraOptions_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_setExtraOptions_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0200 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0200"
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpExtraOptions = {
let tcpExtraOptions = {
keepAlive: true,
keepAlive: true,
OOBInline: true,
OOBInline: true,
...
@@ -1568,12 +1369,7 @@ export default function socketJsunit() {
...
@@ -1568,12 +1369,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_setExtraOptions_0300', 0, function (done) {
it('Telephony_Socket_TCPSocket_setExtraOptions_0300', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0300 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0300 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0300"
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0300"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpExtraOptions = {
let tcpExtraOptions = {
socketLinger: {
socketLinger: {
on: true,
on: true,
...
@@ -1601,12 +1397,7 @@ export default function socketJsunit() {
...
@@ -1601,12 +1397,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_setExtraOptions_0400', 0, function (done) {
it('Telephony_Socket_TCPSocket_setExtraOptions_0400', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0400 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_setExtraOptions_0400 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0400"
let caseName = "Telephony_Socket_TCPSocket_setExtraOptions_0400"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
let tcpExtraOptions = {
let tcpExtraOptions = {
socketLinger: {
socketLinger: {
on: true,
on: true,
...
@@ -1635,12 +1426,7 @@ export default function socketJsunit() {
...
@@ -1635,12 +1426,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_getRemoteAddress_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_getRemoteAddress_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_getRemoteAddress_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_getRemoteAddress_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_getRemoteAddress_0100"
let caseName = "Telephony_Socket_TCPSocket_getRemoteAddress_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.getRemoteAddress((error) => {
tcp.getRemoteAddress((error) => {
if (error) {
if (error) {
console.log(`${caseName} error, case success,error:${toString(error)}`);
console.log(`${caseName} error, case success,error:${toString(error)}`);
...
@@ -1661,12 +1447,7 @@ export default function socketJsunit() {
...
@@ -1661,12 +1447,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_getRemoteAddress_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_getRemoteAddress_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_getRemoteAddress_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_getRemoteAddress_0200 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_getRemoteAddress_0200"
let caseName = "Telephony_Socket_TCPSocket_getRemoteAddress_0200"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.getRemoteAddress().then(data => {
tcp.getRemoteAddress().then(data => {
console.log(`${caseName} success,data:${toString(data)}`);
console.log(`${caseName} success,data:${toString(data)}`);
}).catch((error) => {
}).catch((error) => {
...
@@ -1683,12 +1464,7 @@ export default function socketJsunit() {
...
@@ -1683,12 +1464,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_on_message_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_on_message_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_on_message_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_on_message_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_on_message_0100"
let caseName = "Telephony_Socket_TCPSocket_on_message_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.on("message", data => {
tcp.on("message", data => {
let socketRemoteInfo: socket.SocketRemoteInfo = data.remoteInfo;
let socketRemoteInfo: socket.SocketRemoteInfo = data.remoteInfo;
console.log(`${caseName} port:${socketRemoteInfo.port}`);
console.log(`${caseName} port:${socketRemoteInfo.port}`);
...
@@ -1705,12 +1481,7 @@ export default function socketJsunit() {
...
@@ -1705,12 +1481,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_off_message_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_message_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_message_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_message_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_off_message_0100"
let caseName = "Telephony_Socket_TCPSocket_off_message_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("message", data => {
tcp.off("message", data => {
let socketRemoteInfo: socket.SocketRemoteInfo = data.remoteInfo;
let socketRemoteInfo: socket.SocketRemoteInfo = data.remoteInfo;
console.log(`${caseName} port:${socketRemoteInfo.port}`);
console.log(`${caseName} port:${socketRemoteInfo.port}`);
...
@@ -1726,12 +1497,7 @@ export default function socketJsunit() {
...
@@ -1726,12 +1497,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for message receiving events of the TCPSocket connection.
* @tc.desc : Cancels listening for message receiving events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_off_message_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_message_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_message_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_message_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("message");
tcp.off("message");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_TCPSocket_off_message_0200 Test end*************");
console.log("************* Telephony_Socket_TCPSocket_off_message_0200 Test end*************");
...
@@ -1744,12 +1510,7 @@ export default function socketJsunit() {
...
@@ -1744,12 +1510,7 @@ export default function socketJsunit() {
* @tc.desc : Listens for connection or close events of the TCPSocket connection.
* @tc.desc : Listens for connection or close events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_on_connect_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_on_connect_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_on_connect_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_on_connect_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.on("connect", data => {
tcp.on("connect", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -1763,12 +1524,7 @@ export default function socketJsunit() {
...
@@ -1763,12 +1524,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_off_connect_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_connect_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_connect_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_connect_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("connect", data => {
tcp.off("connect", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -1782,12 +1538,7 @@ export default function socketJsunit() {
...
@@ -1782,12 +1538,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_off_connect_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_connect_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_connect_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_connect_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("connect");
tcp.off("connect");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_TCPSocket_off_connect_0200 Test end*************");
console.log("************* Telephony_Socket_TCPSocket_off_connect_0200 Test end*************");
...
@@ -1800,12 +1551,7 @@ export default function socketJsunit() {
...
@@ -1800,12 +1551,7 @@ export default function socketJsunit() {
* @tc.desc : Listens for connection or close events of the TCPSocket connection.
* @tc.desc : Listens for connection or close events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_on_close_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_on_close_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_on_close_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_on_close_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.on("close", data => {
tcp.on("close", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -1819,12 +1565,7 @@ export default function socketJsunit() {
...
@@ -1819,12 +1565,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_off_close_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_close_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_close_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_close_0100 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("close", data => {
tcp.off("close", data => {
expect(true).assertTrue();
expect(true).assertTrue();
});
});
...
@@ -1838,12 +1579,7 @@ export default function socketJsunit() {
...
@@ -1838,12 +1579,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
* @tc.desc : Cancels listening for connection or close events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_off_close_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_close_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_close_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_close_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("close");
tcp.off("close");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_TCPSocket_off_close_0200 Test end*************");
console.log("************* Telephony_Socket_TCPSocket_off_close_0200 Test end*************");
...
@@ -1857,12 +1593,7 @@ export default function socketJsunit() {
...
@@ -1857,12 +1593,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_on_error_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_on_error_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_on_error_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_on_error_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_on_error_0100"
let caseName = "Telephony_Socket_TCPSocket_on_error_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.on("error", error => {
tcp.on("error", error => {
console.log(`${caseName} fail, error:${toString(error)}`);
console.log(`${caseName} fail, error:${toString(error)}`);
expect().assertFail();
expect().assertFail();
...
@@ -1879,12 +1610,7 @@ export default function socketJsunit() {
...
@@ -1879,12 +1610,7 @@ export default function socketJsunit() {
*/
*/
it('Telephony_Socket_TCPSocket_off_error_0100', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_error_0100', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_error_0100 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_error_0100 Test start*************");
let caseName = "Telephony_Socket_TCPSocket_off_error_0100"
let caseName = "Telephony_Socket_TCPSocket_off_error_0100"
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("error", error => {
tcp.off("error", error => {
console.log(`${caseName} fail, error:${toString(error)}`);
console.log(`${caseName} fail, error:${toString(error)}`);
expect().assertFail();
expect().assertFail();
...
@@ -1900,12 +1626,7 @@ export default function socketJsunit() {
...
@@ -1900,12 +1626,7 @@ export default function socketJsunit() {
* @tc.desc : Cancels listening for error events of the TCPSocket connection.
* @tc.desc : Cancels listening for error events of the TCPSocket connection.
*/
*/
it('Telephony_Socket_TCPSocket_off_error_0200', 0, function (done) {
it('Telephony_Socket_TCPSocket_off_error_0200', 0, function (done) {
console.log("************* Telephony_Socket_TCPSocket_off_error_0200 Test start*************");
console.log("************* Telephony_Socket_TCPSocket_off_error_0200 Test start*************");
if (2 === 0) {
expect(true).assertTrue();
done();
return;
}
tcp.off("error");
tcp.off("error");
expect(true).assertTrue();
expect(true).assertTrue();
console.log("************* Telephony_Socket_TCPSocket_off_error_0200 Test end*************");
console.log("************* Telephony_Socket_TCPSocket_off_error_0200 Test end*************");
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录