Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
786442e4
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
786442e4
编写于
2月 23, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 23, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7710 修改ipc用例
Merge pull request !7710 from 张攀/master
上级
db62ce38
38483382
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
57 addition
and
21 deletion
+57
-21
communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js
...ion/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js
+57
-21
未找到文件。
communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js
浏览文件 @
786442e4
...
...
@@ -3959,7 +3959,7 @@ export default function actsRpcClientJsTest() {
let a = [new MySequenceable(1, "aaa"), new MySequenceable(2, "bbb"),
new MySequenceable(3, "ccc")]
data.writeParcelableArray(a);
await gIRemoteObject.sendMessageRequest(CODE_ALL_ARRAY_TYPE, data, reply, option
,(err,
result) => {
await gIRemoteObject.sendMessageRequest(CODE_ALL_ARRAY_TYPE, data, reply, option
).then((
result) => {
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
...
...
@@ -4015,15 +4015,33 @@ export default function actsRpcClientJsTest() {
data.writeParcelableArray(a);
await gIRemoteObject.sendMessageRequest(CODE_ALL_ARRAY_TYPE, data, reply, option).then((result) => {
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
assertArrayElementEqual(result.reply.readIntArray(), [7, 8, 9]);
assertArrayElementEqual(result.reply.readLongArray(), [10, 11, 12]);
assertArrayElementEqual(result.reply.readFloatArray(), [1.1, 1.2, 1.3]);
assertArrayElementEqual(result.reply.readDoubleArray(), [2.1, 2.2, 2.3]);
assertArrayElementEqual(result.reply.readBooleanArray(), [true, true, false]);
assertArrayElementEqual(result.reply.readCharArray(), [65,97,122]);
assertArrayElementEqual(result.reply.readStringArray(), ['abc', 'seggg']);
let ByteArray = new Array();
result.reply.readByteArray(ByteArray)
assertArrayElementEqual(ByteArray, [1, 2, 3]);
let ShortArray = new Array();
result.reply.readShortArray(ShortArray)
assertArrayElementEqual(ShortArray, [4, 5, 6]);
let IntArray = new Array();
result.reply.readIntArray(IntArray)
assertArrayElementEqual(IntArray, [7, 8, 9]);
let LongArray = new Array();
result.reply.readLongArray(LongArray)
assertArrayElementEqual(LongArray, [10, 11, 12]);
let FloatArray = new Array();
result.reply.readFloatArray(FloatArray)
assertArrayElementEqual(FloatArray, [1.1, 1.2, 1.3]);
let DoubleArray = new Array();
result.reply.readDoubleArray(DoubleArray)
assertArrayElementEqual(DoubleArray, [2.1, 2.2, 2.3]);
let BooleanArray = new Array();
result.reply.readBooleanArray(BooleanArray)
assertArrayElementEqual(BooleanArray, [true, true, false]);
let CharArray = new Array();
result.reply.readCharArray(CharArray)
assertArrayElementEqual(CharArray, [65,97,122]);
let StringArray = new Array();
result.reply.readStringArray(StringArray);
assertArrayElementEqual(StringArray, ['abc', 'seggg']);
let b = [new MySequenceable(null, null), new MySequenceable(null, null),
new MySequenceable(null, null)];
result.reply.readParcelableArray(b);
...
...
@@ -9533,7 +9551,7 @@ export default function actsRpcClientJsTest() {
let a = [new MySequenceable(1, "aaa"), new MySequenceable(2, "bbb"),
new MySequenceable(3, "ccc")];
expect(data.writeSequenceableArray(a)).assertTrue();
gIRemoteObject.sendRequest(CODE_ALL_ARRAY_TYPE, data, reply, option
,(err,
result) => {
gIRemoteObject.sendRequest(CODE_ALL_ARRAY_TYPE, data, reply, option
).then((
result) => {
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
...
...
@@ -9593,15 +9611,33 @@ export default function actsRpcClientJsTest() {
expect(data.writeSequenceableArray(a)).assertTrue();
gIRemoteObject.sendRequest(CODE_ALL_ARRAY_TYPE, data, reply, option).then((result) => {
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
assertArrayElementEqual(result.reply.readIntArray(), [7, 8, 9]);
assertArrayElementEqual(result.reply.readLongArray(), [10, 11, 12]);
assertArrayElementEqual(result.reply.readFloatArray(), [1.1, 1.2, 1.3]);
assertArrayElementEqual(result.reply.readDoubleArray(), [2.1, 2.2, 2.3]);
assertArrayElementEqual(result.reply.readBooleanArray(), [true, true, false]);
assertArrayElementEqual(result.reply.readCharArray(), [10, 20, 30]);
assertArrayElementEqual(result.reply.readStringArray(), ['abc', 'seggg']);
let ByteArray = new Array();
result.reply.readByteArray(ByteArray)
assertArrayElementEqual(ByteArray, [1, 2, 3]);
let ShortArray = new Array();
result.reply.readShortArray(ShortArray)
assertArrayElementEqual(ShortArray, [4, 5, 6]);
let IntArray = new Array();
result.reply.readIntArray(IntArray)
assertArrayElementEqual(IntArray, [7, 8, 9]);
let LongArray = new Array();
result.reply.readLongArray(LongArray)
assertArrayElementEqual(LongArray, [10, 11, 12]);
let FloatArray = new Array();
result.reply.readFloatArray(FloatArray)
assertArrayElementEqual(FloatArray, [1.1, 1.2, 1.3]);
let DoubleArray = new Array();
result.reply.readDoubleArray(DoubleArray)
assertArrayElementEqual(DoubleArray, [2.1, 2.2, 2.3]);
let BooleanArray = new Array();
result.reply.readBooleanArray(BooleanArray)
assertArrayElementEqual(BooleanArray, [true, true, false]);
let CharArray = new Array();
result.reply.readCharArray(CharArray)
assertArrayElementEqual(CharArray, [65,97,122]);
let StringArray = new Array();
result.reply.readStringArray(StringArray);
assertArrayElementEqual(StringArray, ['abc', 'seggg']);
let b = [new MySequenceable(null, null), new MySequenceable(null, null),
new MySequenceable(null, null)];
result.reply.readSequenceableArray(b);
...
...
@@ -13206,7 +13242,7 @@ export default function actsRpcClientJsTest() {
data.writeString("HelloWorld");
data.writeParcelable(new MySequenceable(1, "aaa"));
await gIRemoteObject.sendMessageRequest(CODE_ALL_TYPE, data, reply, option
, (err,
result) => {
await gIRemoteObject.sendMessageRequest(CODE_ALL_TYPE, data, reply, option
).then((
result) => {
console.info("SUB_Softbus_IPC_Compatibility_IRemoteObject_00900 errorcode: " + result.errCode);
expect(result.errCode).assertEqual(0);
expect(result.reply.readByte()).assertEqual(1);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录