Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
05cf3485
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看板
未验证
提交
05cf3485
编写于
2月 23, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 23, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7711 修改ipc用例
Merge pull request !7711 from 张攀/cherry-pick-1677118168
上级
f4f8d7d7
dc05074d
变更
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
浏览文件 @
05cf3485
...
@@ -3959,7 +3959,7 @@ export default function actsRpcClientJsTest() {
...
@@ -3959,7 +3959,7 @@ export default function actsRpcClientJsTest() {
let a = [new MySequenceable(1, "aaa"), new MySequenceable(2, "bbb"),
let a = [new MySequenceable(1, "aaa"), new MySequenceable(2, "bbb"),
new MySequenceable(3, "ccc")]
new MySequenceable(3, "ccc")]
data.writeParcelableArray(a);
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);
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
...
@@ -4015,15 +4015,33 @@ export default function actsRpcClientJsTest() {
...
@@ -4015,15 +4015,33 @@ export default function actsRpcClientJsTest() {
data.writeParcelableArray(a);
data.writeParcelableArray(a);
await gIRemoteObject.sendMessageRequest(CODE_ALL_ARRAY_TYPE, data, reply, option).then((result) => {
await gIRemoteObject.sendMessageRequest(CODE_ALL_ARRAY_TYPE, data, reply, option).then((result) => {
expect(result.errCode).assertEqual(0);
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
let ByteArray = new Array();
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
result.reply.readByteArray(ByteArray)
assertArrayElementEqual(result.reply.readIntArray(), [7, 8, 9]);
assertArrayElementEqual(ByteArray, [1, 2, 3]);
assertArrayElementEqual(result.reply.readLongArray(), [10, 11, 12]);
let ShortArray = new Array();
assertArrayElementEqual(result.reply.readFloatArray(), [1.1, 1.2, 1.3]);
result.reply.readShortArray(ShortArray)
assertArrayElementEqual(result.reply.readDoubleArray(), [2.1, 2.2, 2.3]);
assertArrayElementEqual(ShortArray, [4, 5, 6]);
assertArrayElementEqual(result.reply.readBooleanArray(), [true, true, false]);
let IntArray = new Array();
assertArrayElementEqual(result.reply.readCharArray(), [65,97,122]);
result.reply.readIntArray(IntArray)
assertArrayElementEqual(result.reply.readStringArray(), ['abc', 'seggg']);
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),
let b = [new MySequenceable(null, null), new MySequenceable(null, null),
new MySequenceable(null, null)];
new MySequenceable(null, null)];
result.reply.readParcelableArray(b);
result.reply.readParcelableArray(b);
...
@@ -9533,7 +9551,7 @@ export default function actsRpcClientJsTest() {
...
@@ -9533,7 +9551,7 @@ export default function actsRpcClientJsTest() {
let a = [new MySequenceable(1, "aaa"), new MySequenceable(2, "bbb"),
let a = [new MySequenceable(1, "aaa"), new MySequenceable(2, "bbb"),
new MySequenceable(3, "ccc")];
new MySequenceable(3, "ccc")];
expect(data.writeSequenceableArray(a)).assertTrue();
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);
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
...
@@ -9593,15 +9611,33 @@ export default function actsRpcClientJsTest() {
...
@@ -9593,15 +9611,33 @@ export default function actsRpcClientJsTest() {
expect(data.writeSequenceableArray(a)).assertTrue();
expect(data.writeSequenceableArray(a)).assertTrue();
gIRemoteObject.sendRequest(CODE_ALL_ARRAY_TYPE, data, reply, option).then((result) => {
gIRemoteObject.sendRequest(CODE_ALL_ARRAY_TYPE, data, reply, option).then((result) => {
expect(result.errCode).assertEqual(0);
expect(result.errCode).assertEqual(0);
assertArrayElementEqual(result.reply.readByteArray(), [1, 2, 3]);
let ByteArray = new Array();
assertArrayElementEqual(result.reply.readShortArray(), [4, 5, 6]);
result.reply.readByteArray(ByteArray)
assertArrayElementEqual(result.reply.readIntArray(), [7, 8, 9]);
assertArrayElementEqual(ByteArray, [1, 2, 3]);
assertArrayElementEqual(result.reply.readLongArray(), [10, 11, 12]);
let ShortArray = new Array();
assertArrayElementEqual(result.reply.readFloatArray(), [1.1, 1.2, 1.3]);
result.reply.readShortArray(ShortArray)
assertArrayElementEqual(result.reply.readDoubleArray(), [2.1, 2.2, 2.3]);
assertArrayElementEqual(ShortArray, [4, 5, 6]);
assertArrayElementEqual(result.reply.readBooleanArray(), [true, true, false]);
let IntArray = new Array();
assertArrayElementEqual(result.reply.readCharArray(), [10, 20, 30]);
result.reply.readIntArray(IntArray)
assertArrayElementEqual(result.reply.readStringArray(), ['abc', 'seggg']);
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),
let b = [new MySequenceable(null, null), new MySequenceable(null, null),
new MySequenceable(null, null)];
new MySequenceable(null, null)];
result.reply.readSequenceableArray(b);
result.reply.readSequenceableArray(b);
...
@@ -13206,7 +13242,7 @@ export default function actsRpcClientJsTest() {
...
@@ -13206,7 +13242,7 @@ export default function actsRpcClientJsTest() {
data.writeString("HelloWorld");
data.writeString("HelloWorld");
data.writeParcelable(new MySequenceable(1, "aaa"));
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);
console.info("SUB_Softbus_IPC_Compatibility_IRemoteObject_00900 errorcode: " + result.errCode);
expect(result.errCode).assertEqual(0);
expect(result.errCode).assertEqual(0);
expect(result.reply.readByte()).assertEqual(1);
expect(result.reply.readByte()).assertEqual(1);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录