提交 c4286325 编写于 作者: 华华小仙女

修改setWindowTypeTest3用例

Signed-off-by: N华华小仙女 <zhurong18@h-partners.com>
上级 a45ec152
...@@ -1188,7 +1188,8 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1188,7 +1188,8 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
} }
let loopCount1 = systemWindowTypeArr; let loopCount1 = systemWindowTypeArr;
console.log(msgStr + 'ohosWindow.windowType' + JSON.stringify(loopCount1)) console.log(msgStr + 'ohosWindow.windowType' + JSON.stringify(loopCount1))
for (let i = 0; i < loopCount1.length; i++) { getData(0, loopCount1.length)
function getData(i, length) {
let tempType = ohosWindow.WindowType[loopCount1[i]]; let tempType = ohosWindow.WindowType[loopCount1[i]];
console.log(msgStr + 'tempWnd.setWindowType ' + tempType + ' start'); console.log(msgStr + 'tempWnd.setWindowType ' + tempType + ' start');
tempTypeArr.push(tempType); tempTypeArr.push(tempType);
...@@ -1211,7 +1212,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1211,7 +1212,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.getProperties dataProper: ' + JSON.stringify(dataProper)); console.log(msgStr + 'tempWnd.getProperties dataProper: ' + JSON.stringify(dataProper));
console.log(msgStr + 'tempWnd.getProperties !!dataProper: ' + !!dataProper); console.log(msgStr + 'tempWnd.getProperties !!dataProper: ' + !!dataProper);
try { try {
expect(!!dataProper).assertTrue(); expect(!!dataProper).assertTrue();
} catch (error) { } catch (error) {
console.info(`tempWnd.getProperties catch error: ${JSON.stringify(error)}`) console.info(`tempWnd.getProperties catch error: ${JSON.stringify(error)}`)
...@@ -1223,8 +1223,14 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1223,8 +1223,14 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.getProperties true tempTypeArr.length: ' + tempTypeArr.length); console.log(msgStr + 'tempWnd.getProperties true tempTypeArr.length: ' + tempTypeArr.length);
console.log(msgStr + 'tempWnd.getProperties true loopCount1.length: ' + loopCount1.length); console.log(msgStr + 'tempWnd.getProperties true loopCount1.length: ' + loopCount1.length);
console.log(msgStr + 'tempWnd.getProperties true tempTypeArr.length + 1: ' + Number(tempTypeArr.length + 1)); console.log(msgStr + 'tempWnd.getProperties true tempTypeArr.length + 1: ' + Number(tempTypeArr.length + 1));
console.log(msgStr + 'tempWnd.getProperties true (loopCount1.length - i): ' + (loopCount1.length - i));
console.log(msgStr + 'tempWnd.getProperties true (tempTypeArr.length + 1): ' + (tempTypeArr.length + 1));
try { try {
expect((loopCount1.length - i) == (tempTypeArr.length + 1)).assertTrue(); expect(tempTypeArr.length === 0).assertTrue();
if (++i < length) {
getData(i, length)
console.log(msgStr + 'jixuzhixing i: ' + i);
}
} catch (error) { } catch (error) {
console.info(`tempWnd.getProperties catch error: ${JSON.stringify(error)}`) console.info(`tempWnd.getProperties catch error: ${JSON.stringify(error)}`)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册