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

!9269 【Distributeddatamgr】【Master】剪贴板用例修改

Merge pull request !9269 from lina123456/master
......@@ -710,7 +710,7 @@ export default function pasteBoardRecordTest(){
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_ADDRECORD_1100
* @tc.name AddData
* @tc.desc Test pasteBoard add 613th record fail
* @tc.desc Test pasteBoard add 613th record successful
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
......@@ -725,10 +725,10 @@ export default function pasteBoardRecordTest(){
pasteData.addRecord("stringRecord513", ARRAY_BUFFER);
}catch(err){
console.info("Add record error, err code is: " + err.code)
expect(err.code).assertEqual("12900002")
expect(err!=undefined).assertFail();
}
let hasType = pasteData.hasType("stringRecord513")
expect(hasType == false).assertTrue();
expect(hasType == true).assertTrue();
console.info("SUB_PASTEBOARD_FUNCTION_ETS_ADDRECORD_1100 end")
done();
})
......@@ -754,6 +754,32 @@ export default function pasteBoardRecordTest(){
expect(error != undefined).assertTrue();
console.info("SUB_PASTEBOARD_FUNCTION_ETS_ADDRECORD_1200 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_ADDRECORD_1300
* @tc.name AddData
* @tc.desc Test pasteBoard add 613th record successful
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_ADDRECORD_1300', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_ADDRECORD_1300 start")
let pasteData = pasteboard.createData("string",ARRAY_BUFFER)
for(var i = 0; i < 998; i++){
pasteData.addRecord("stringRecord" + i, ARRAY_BUFFER);
}
try{
pasteData.addRecord("stringRecord1000", ARRAY_BUFFER);
}catch(err){
console.info("Add record error, err code is: " + err.code)
expect(err!=undefined).assertFail();
}
let hasType = pasteData.hasType("stringRecord1000")
expect(hasType == true).assertTrue();
console.info("SUB_PASTEBOARD_FUNCTION_ETS_ADDRECORD_1300 end")
done();
})
});
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册