未验证 提交 fbd5051d 编写于 作者: O openharmony_ci 提交者: Gitee

!2876 【分布式硬件】修改内源检视意见

Merge pull request !2876 from zeng_xingdong/master
...@@ -127,7 +127,7 @@ describe('deviceManagerTest', function() { ...@@ -127,7 +127,7 @@ describe('deviceManagerTest', function() {
expect().assertFail(); expect().assertFail();
} }
var info = { let info = {
"subscribeId": 2115, "subscribeId": 2115,
"mode": DISCOVER_MODE_ACTIVE, "mode": DISCOVER_MODE_ACTIVE,
"medium": AUTO, "medium": AUTO,
...@@ -136,7 +136,7 @@ describe('deviceManagerTest', function() { ...@@ -136,7 +136,7 @@ describe('deviceManagerTest', function() {
"isWakeRemote": true, "isWakeRemote": true,
"capability": 0 "capability": 0
}; };
var start = data.startDeviceDiscovery(info); let start = data.startDeviceDiscovery(info);
expect(start != null).assertTrue(); expect(start != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_startDeviceDiscovery_0100----------"); console.log("----------stop running deviceManagerTest_startDeviceDiscovery_0100----------");
...@@ -157,7 +157,7 @@ describe('deviceManagerTest', function() { ...@@ -157,7 +157,7 @@ describe('deviceManagerTest', function() {
expect().assertFail(); expect().assertFail();
} }
var info = { let info = {
"subscribeId": 2115, "subscribeId": 2115,
"mode": DISCOVER_MODE_PASSIVE, "mode": DISCOVER_MODE_PASSIVE,
"medium": BLE, "medium": BLE,
...@@ -166,7 +166,7 @@ describe('deviceManagerTest', function() { ...@@ -166,7 +166,7 @@ describe('deviceManagerTest', function() {
"isWakeRemote": true, "isWakeRemote": true,
"capability": SUBSCRIBE_CAPABILITY_OSD "capability": SUBSCRIBE_CAPABILITY_OSD
}; };
var start = data.startDeviceDiscovery(info); let start = data.startDeviceDiscovery(info);
expect(start != null).assertTrue(); expect(start != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_startDeviceDiscovery_0100----------"); console.log("----------stop running deviceManagerTest_startDeviceDiscovery_0100----------");
...@@ -187,7 +187,7 @@ describe('deviceManagerTest', function() { ...@@ -187,7 +187,7 @@ describe('deviceManagerTest', function() {
expect().assertFail(); expect().assertFail();
} }
var info = { let info = {
"subscribeId": 2115, "subscribeId": 2115,
"mode": DISCOVER_MODE_PASSIVE, "mode": DISCOVER_MODE_PASSIVE,
"medium": COAP, "medium": COAP,
...@@ -196,7 +196,7 @@ describe('deviceManagerTest', function() { ...@@ -196,7 +196,7 @@ describe('deviceManagerTest', function() {
"isWakeRemote": true, "isWakeRemote": true,
"capability": SUBSCRIBE_CAPABILITY_DDMP "capability": SUBSCRIBE_CAPABILITY_DDMP
}; };
var start = data.startDeviceDiscovery(info); let start = data.startDeviceDiscovery(info);
expect(start != null).assertTrue(); expect(start != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_startDeviceDiscovery_0100----------"); console.log("----------stop running deviceManagerTest_startDeviceDiscovery_0100----------");
...@@ -216,7 +216,7 @@ describe('deviceManagerTest', function() { ...@@ -216,7 +216,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var re = data.release(); let re = data.release();
expect(re != null).assertTrue(); expect(re != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_release_0100----------"); console.log("----------stop running deviceManagerTest_release_0100----------");
...@@ -236,7 +236,7 @@ describe('deviceManagerTest', function() { ...@@ -236,7 +236,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var array = data.getTrustedDeviceListSync(); let array = data.getTrustedDeviceListSync();
expect(array == null).assertTrue(); expect(array == null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_getTrustedDeviceListSync_0100----------"); console.log("----------stop running deviceManagerTest_getTrustedDeviceListSync_0100----------");
...@@ -256,8 +256,8 @@ describe('deviceManagerTest', function() { ...@@ -256,8 +256,8 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var subscribeId = 2115; let subscribeId = 2115;
var start = data.stopDeviceDiscovery(subscribeId); let start = data.stopDeviceDiscovery(subscribeId);
expect(start != null).assertTrue(); expect(start != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_stopDeviceDiscovery_0100----------"); console.log("----------stop running deviceManagerTest_stopDeviceDiscovery_0100----------");
...@@ -283,7 +283,7 @@ describe('deviceManagerTest', function() { ...@@ -283,7 +283,7 @@ describe('deviceManagerTest', function() {
},1000); },1000);
}); });
async function dmGetLocalDeviceInfoSync(){ async function dmGetLocalDeviceInfoSync(){
var deviceInfo = dmClass.getLocalDeviceInfoSync(); let deviceInfo = dmClass.getLocalDeviceInfoSync();
expect(deviceInfo.deviceId != null).assertTrue(); expect(deviceInfo.deviceId != null).assertTrue();
} }
console.log("----------stop running deviceManagerTest_getLocalDeviceInfoSync_0100----------"); console.log("----------stop running deviceManagerTest_getLocalDeviceInfoSync_0100----------");
...@@ -309,7 +309,7 @@ describe('deviceManagerTest', function() { ...@@ -309,7 +309,7 @@ describe('deviceManagerTest', function() {
},1000); },1000);
}); });
async function getLocalDeviceInfo1(){ async function getLocalDeviceInfo1(){
var deviceInfo = dmClass.getLocalDeviceInfo((err, data) => { let deviceInfo = dmClass.getLocalDeviceInfo((err, data) => {
if (err) { if (err) {
expect().assertFail(); expect().assertFail();
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
...@@ -340,7 +340,7 @@ describe('deviceManagerTest', function() { ...@@ -340,7 +340,7 @@ describe('deviceManagerTest', function() {
},1000); },1000);
}); });
async function getLocalDeviceInfo2(){ async function getLocalDeviceInfo2(){
var deviceInfo = dmClass.getLocalDeviceInfo().then(data => { let deviceInfo = dmClass.getLocalDeviceInfo().then(data => {
}) })
expect(deviceInfo != null).assertTrue(); expect(deviceInfo != null).assertTrue();
} }
...@@ -384,7 +384,7 @@ describe('deviceManagerTest', function() { ...@@ -384,7 +384,7 @@ describe('deviceManagerTest', function() {
expect().assertFail(); expect().assertFail();
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
} }
var token = data.pinToken; let token = data.pinToken;
expect(token != null).assertTrue(); expect(token != null).assertTrue();
}); });
}); });
...@@ -428,7 +428,7 @@ describe('deviceManagerTest', function() { ...@@ -428,7 +428,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] authenticateDevice error"); console.log("[deviceManagerTest] authenticateDevice error");
expect().assertFail(); expect().assertFail();
} }
var token = data.pinToken; let token = data.pinToken;
expect(token != null).assertTrue(); expect(token != null).assertTrue();
}); });
}); });
...@@ -472,7 +472,7 @@ describe('deviceManagerTest', function() { ...@@ -472,7 +472,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] authenticateDevice error"); console.log("[deviceManagerTest] authenticateDevice error");
expect().assertFail(); expect().assertFail();
} }
var token = data.pinToken; let token = data.pinToken;
expect(token != null).assertTrue(); expect(token != null).assertTrue();
}); });
}); });
...@@ -516,7 +516,7 @@ describe('deviceManagerTest', function() { ...@@ -516,7 +516,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] authenticateDevice error"); console.log("[deviceManagerTest] authenticateDevice error");
expect().assertFail(); expect().assertFail();
} }
var token = data.pinToken; let token = data.pinToken;
expect(token != null).assertTrue(); expect(token != null).assertTrue();
}); });
}); });
...@@ -560,7 +560,7 @@ describe('deviceManagerTest', function() { ...@@ -560,7 +560,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] authenticateDevice error"); console.log("[deviceManagerTest] authenticateDevice error");
expect().assertFail(); expect().assertFail();
} }
var token = data.pinToken; let token = data.pinToken;
expect(token != null).assertTrue(); expect(token != null).assertTrue();
}); });
}); });
...@@ -604,7 +604,7 @@ describe('deviceManagerTest', function() { ...@@ -604,7 +604,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] authenticateDevice error"); console.log("[deviceManagerTest] authenticateDevice error");
expect().assertFail(); expect().assertFail();
} }
var token = data.pinToken; let token = data.pinToken;
expect(token != null).assertTrue(); expect(token != null).assertTrue();
}); });
}); });
...@@ -680,7 +680,7 @@ describe('deviceManagerTest', function() { ...@@ -680,7 +680,7 @@ describe('deviceManagerTest', function() {
"appThumbnail": new Uint8Array([]), "appThumbnail": new Uint8Array([]),
"extraInfo": extraInfo "extraInfo": extraInfo
} }
var result = dmClass.unAuthenticateDevice(deviceInfo, authParam, (err, data) => { let result = dmClass.unAuthenticateDevice(deviceInfo, authParam, (err, data) => {
if (err) { if (err) {
console.log("[deviceManagerTest] unAuthenticateDevice error"); console.log("[deviceManagerTest] unAuthenticateDevice error");
expect().assertFail(); expect().assertFail();
...@@ -705,7 +705,7 @@ describe('deviceManagerTest', function() { ...@@ -705,7 +705,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var authparam = data.getAuthenticationParam(); let authparam = data.getAuthenticationParam();
expect(authparam != null).assertTrue(); expect(authparam != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_getAuthenticationParam_0100----------"); console.log("----------stop running deviceManagerTest_getAuthenticationParam_0100----------");
...@@ -725,7 +725,7 @@ describe('deviceManagerTest', function() { ...@@ -725,7 +725,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => { let fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => {
expect(deviceStateChangeAction.ONLINE == 0).assertTrue(); expect(deviceStateChangeAction.ONLINE == 0).assertTrue();
}); });
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
...@@ -747,7 +747,7 @@ describe('deviceManagerTest', function() { ...@@ -747,7 +747,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => { let fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => {
expect(deviceStateChangeAction.OFFLINE == 0).assertTrue(); expect(deviceStateChangeAction.OFFLINE == 0).assertTrue();
}); });
expect(fa != null).assertNotNull(); expect(fa != null).assertNotNull();
...@@ -769,7 +769,7 @@ describe('deviceManagerTest', function() { ...@@ -769,7 +769,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => { let fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => {
expect(deviceStateChangeAction.READY == 0).assertTrue(); expect(deviceStateChangeAction.READY == 0).assertTrue();
}); });
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
...@@ -791,7 +791,7 @@ describe('deviceManagerTest', function() { ...@@ -791,7 +791,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => { let fa = data.on('deviceStateChange', (deviceStateChangeAction, deviceInfo) => {
expect(deviceStateChangeAction.CHANGE == 0).assertTrue(); expect(deviceStateChangeAction.CHANGE == 0).assertTrue();
}); });
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
...@@ -813,7 +813,7 @@ describe('deviceManagerTest', function() { ...@@ -813,7 +813,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.off('deviceStateChange', () => {}); let fa = data.off('deviceStateChange', () => {});
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_off-deviceStateChange_0100----------"); console.log("----------stop running deviceManagerTest_off-deviceStateChange_0100----------");
...@@ -833,7 +833,7 @@ describe('deviceManagerTest', function() { ...@@ -833,7 +833,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.on('deviceFound', () => {}); let fa = data.on('deviceFound', () => {});
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_on-deviceFound_0100----------"); console.log("----------stop running deviceManagerTest_on-deviceFound_0100----------");
...@@ -853,7 +853,7 @@ describe('deviceManagerTest', function() { ...@@ -853,7 +853,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.off('deviceFound', () => {}); let fa = data.off('deviceFound', () => {});
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_off-deviceFound_0100----------"); console.log("----------stop running deviceManagerTest_off-deviceFound_0100----------");
...@@ -873,7 +873,7 @@ describe('deviceManagerTest', function() { ...@@ -873,7 +873,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.on('discoverFail', () => {}); let fa = data.on('discoverFail', () => {});
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_on-discoverFail_0100----------"); console.log("----------stop running deviceManagerTest_on-discoverFail_0100----------");
...@@ -893,7 +893,7 @@ describe('deviceManagerTest', function() { ...@@ -893,7 +893,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.off('discoverFail', () => {}); let fa = data.off('discoverFail', () => {});
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_off-discoverFail_0100----------"); console.log("----------stop running deviceManagerTest_off-discoverFail_0100----------");
...@@ -913,7 +913,7 @@ describe('deviceManagerTest', function() { ...@@ -913,7 +913,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.on('serviceDie', () => {}); let fa = data.on('serviceDie', () => {});
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
}); });
console.log("----------start running deviceManagerTest_on-serviceDie_0100----------"); console.log("----------start running deviceManagerTest_on-serviceDie_0100----------");
...@@ -933,7 +933,7 @@ describe('deviceManagerTest', function() { ...@@ -933,7 +933,7 @@ describe('deviceManagerTest', function() {
console.log("[deviceManagerTest] createDeviceManager error"); console.log("[deviceManagerTest] createDeviceManager error");
expect().assertFail(); expect().assertFail();
} }
var fa = data.off('serviceDie', () => {}); let fa = data.off('serviceDie', () => {});
expect(fa != null).assertTrue(); expect(fa != null).assertTrue();
}); });
console.log("----------stop running deviceManagerTest_off-serviceDie_0100----------"); console.log("----------stop running deviceManagerTest_off-serviceDie_0100----------");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册