提交 ebf28a06 编写于 作者: G gaoxi

case update

Signed-off-by: Ngaoxi <gaoxi785@huawei.com>
上级 3b4fd4b8
......@@ -229,24 +229,24 @@ describe('Telephony_NETSTACK_SocketTest', function () {
let udp = netSocket.constructUDPSocketInstance()
udp.on('message', function () {
})
udp.on('listening', function () {
})
udp.on('close', function () {
})
udp.on('error', function () {
})
udp.off('message', function () {
expect().assertFail()
done()
})
udp.on('listening', function () {
})
udp.off('listening', function () {
expect().assertFail()
done()
})
udp.on('close', function () {
})
udp.off('close', function () {
expect().assertFail()
done()
})
udp.on('error', function () {
})
udp.off('error', function () {
expect().assertFail()
done()
......@@ -453,24 +453,24 @@ describe('Telephony_NETSTACK_SocketTest', function () {
let tcp = netSocket.constructTCPSocketInstance()
tcp.on('message', function () {
})
tcp.on('connect', function () {
})
tcp.on('close', function () {
})
tcp.on('error', function () {
})
tcp.off('message', function () {
expect().assertFail()
done()
})
tcp.on('connect', function () {
})
tcp.off('connect', function () {
expect().assertFail()
done()
})
tcp.on('close', function () {
})
tcp.off('close', function () {
expect().assertFail()
done()
})
tcp.on('error', function () {
})
tcp.off('error', function () {
expect().assertFail()
done()
......
......@@ -403,10 +403,10 @@ describe('SimManagerTest', function () {
*/
it('Telephony_Sim_hasOperatorPrivileges_Async_0400', 0, function (done) {
const CASE_NAME = 'Telephony_Sim_hasOperatorPrivileges_Async_0400';
sim.hasOperatorPrivileges(env.SLOTID2, (error, result) => {
if (error) {
console.log(`${CASE_NAME} hasOperatorPrivileges error: ${error.message}`);
expect().assertFail();
sim.hasOperatorPrivileges(env.SLOTID2, (err, result) => {
if (err) {
console.log(`${CASE_NAME} hasOperatorPrivileges err: ${err.message}`);
expect(err.code).assertEqual(202);
done();
return;
}
......@@ -430,7 +430,7 @@ describe('SimManagerTest', function () {
console.log(`${CASE_NAME} test finish.`);
} catch (error) {
console.log(`${CASE_NAME} hasOperatorPrivileges error: ${error.message}`);
expect().assertFail();
expect(err.code).assertEqual(202);
}
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册