From 5b3ac80442728a26c1be8aae59177b8e28e525dc Mon Sep 17 00:00:00 2001 From: yang-qibo Date: Thu, 27 Oct 2022 21:35:38 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20f9232b0=20from=20https://gitee.com/yang?= =?UTF-8?q?-qibo/xts=5Facts/pulls/6193=20IPC=E6=96=B0=E5=A2=9E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=94=A8=E4=BE=8B=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yang-qibo --- .../src/main/js/test/RpcClientJsunit.test.js | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js b/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js index 713dcf072..375844d65 100755 --- a/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js +++ b/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js @@ -9679,7 +9679,68 @@ export default function actsRpcClientJsTest() { expect(error.code != errCode).assertTrue(); } console.info("---------------------end SUB_Softbus_IPC_Compatibility_IPCSkeleton_01700---------------------------"); - }) + }) + + /* + * @tc.number SUB_Softbus_IPC_Compatibility_IPCSkeleton_01800 + * @tc.name restoreCallingIdentity Interface flags input parameter boundary value verification + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_Softbus_IPC_Compatibility_IPCSkeleton_01800", 0,async function(){ + console.info("---------------------start SUB_Softbus_IPC_Compatibility_IPCSkeleton_01800---------------------------"); + try{ + let id = ""; + rpc.IPCSkeleton.restoreCallingIdentity(id); + console.info("SUB_Softbus_IPC_Compatibility_IPCSkeleton_01800 restoreCallingIdentity is success"); + } catch (error) { + console.info("SUB_Softbus_IPC_Compatibility_IPCSkeleton_01800:error = " + error); + expect(error == null).assertTrue(); + } + console.info("---------------------end SUB_Softbus_IPC_Compatibility_IPCSkeleton_01800---------------------------"); + }); + + /* + * @tc.number SUB_Softbus_IPC_Compatibility_IPCSkeleton_01900 + * @tc.name restoreCallingIdentity Interface flags input parameter 0 value verification + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_Softbus_IPC_Compatibility_IPCSkeleton_01900", 0,async function(){ + console.info("---------------------start SUB_Softbus_IPC_Compatibility_IPCSkeleton_01900---------------------------"); + try{ + let id = 0; + rpc.IPCSkeleton.restoreCallingIdentity(id); + console.info("SUB_Softbus_IPC_Compatibility_IPCSkeleton_01900 restoreCallingIdentity is success"); + } catch (error) { + console.info("SUB_Softbus_IPC_Compatibility_IPCSkeleton_01900:error = " + error); + expect(error == null).assertTrue(); + } + console.info("---------------------end SUB_Softbus_IPC_Compatibility_IPCSkeleton_01900---------------------------"); + }); + + /* + * @tc.number SUB_Softbus_IPC_Compatibility_IPCSkeleton_02000 + * @tc.name restoreCallingIdentity Interface flags input parameter null value verification + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_Softbus_IPC_Compatibility_IPCSkeleton_02000", 0,async function(){ + console.info("---------------------start SUB_Softbus_IPC_Compatibility_IPCSkeleton_02000---------------------------"); + try{ + let id = ""; + for (let i = 0; i < (40*K - 1); i++){ + id += "a"; + } + console.info("SUB_Softbus_IPC_Compatibility_IPCSkeleton_02000 id length is: " + id.length); + rpc.IPCSkeleton.restoreCallingIdentity(id); + console.info("SUB_Softbus_IPC_Compatibility_IPCSkeleton_02000 restoreCallingIdentity is success"); + } catch (error) { + console.info("SUB_Softbus_IPC_Compatibility_IPCSkeleton_02000:error = " + error); + expect(error == null).assertTrue(); + } + console.info("---------------------end SUB_Softbus_IPC_Compatibility_IPCSkeleton_02000---------------------------"); + }); console.info("-----------------------SUB_Softbus_IPC_Compatibility_MessageParce_Test is end-----------------------"); }); } -- GitLab