提交 adce5539 编写于 作者: G greada

每行代码应该少于 120 个字符

Signed-off-by: Ngreada <kangqiao1@huawei.com>
上级 784f4d75
......@@ -37,24 +37,25 @@ describe('appInfoTest_battery3', function () {
})
//createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>)
it('create_running_lock_callback_test', 0, async function (done) {
runningLock.createRunningLock("running_lock_test_2", runningLock.RunningLockType.BACKGROUND, (error, runninglock) => {
if (typeof error === "undefined") {
console.info('create_running_lock_callback_test: runningLock is ' + runninglock);
expect(runninglock !== null).assertTrue();
let used = runninglock.isUsed();
console.info('create_running_lock_callback_test is used: ' + used);
expect(used).assertFalse();
runninglock.lock(500);
used = runninglock.isUsed();
console.info('after lock create_running_lock_callback_test is used: ' + used);
expect(used).assertTrue();
console.info('create_running_lock_callback_test success');
done();
} else {
console.log('create_running_lock_callback_test: ' + error);
expect().assertFail();
done();
}
runningLock.createRunningLock("running_lock_test_2", runningLock.RunningLockType.BACKGROUND,
(error, runninglock) => {
if (typeof error === "undefined") {
console.info('create_running_lock_callback_test: runningLock is ' + runninglock);
expect(runninglock !== null).assertTrue();
let used = runninglock.isUsed();
console.info('create_running_lock_callback_test is used: ' + used);
expect(used).assertFalse();
runninglock.lock(500);
used = runninglock.isUsed();
console.info('after lock create_running_lock_callback_test is used: ' + used);
expect(used).assertTrue();
console.info('create_running_lock_callback_test success');
done();
} else {
console.log('create_running_lock_callback_test: ' + error);
expect().assertFail();
done();
}
})
})
//lock(timeout: number)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册