Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2196f7f8
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看板
未验证
提交
2196f7f8
编写于
6月 09, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3480 Modify the bug that the key in plainarray is not integer
Merge pull request !3480 from wangyong/five_XTS
上级
4998c92b
53f5df6d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
4 deletion
+31
-4
compileruntime/containerLine_lib_standard/src/main/js/test/ArrayList.test.js
...ainerLine_lib_standard/src/main/js/test/ArrayList.test.js
+18
-2
compileruntime/containerLine_lib_standard/src/main/js/test/Vector.test.js
...ontainerLine_lib_standard/src/main/js/test/Vector.test.js
+1
-1
compileruntime/containerRelation_lib_standard/src/main/js/test/PlainArray.test.js
...Relation_lib_standard/src/main/js/test/PlainArray.test.js
+12
-1
未找到文件。
compileruntime/containerLine_lib_standard/src/main/js/test/ArrayList.test.js
浏览文件 @
2196f7f8
...
@@ -533,8 +533,8 @@ describe("ArraylistTest", function () {
...
@@ -533,8 +533,8 @@ describe("ArraylistTest", function () {
arrayList
.
removeByRange
(
0
,
9
);
arrayList
.
removeByRange
(
0
,
9
);
let
res
=
arrayList
.
length
;
let
res
=
arrayList
.
length
;
let
res1
=
arrayList
.
getLastIndexOf
(
1
);
let
res1
=
arrayList
.
getLastIndexOf
(
1
);
expect
(
res
).
assertEqual
(
1
);
expect
(
res
).
assertEqual
(
0
);
expect
(
res1
).
assertEqual
(
0
);
expect
(
res1
).
assertEqual
(
-
1
);
});
});
it
(
"
SR000GGR44_testSubArrayList040
"
,
0
,
function
()
{
it
(
"
SR000GGR44_testSubArrayList040
"
,
0
,
function
()
{
let
arrayList
=
new
ArrayList
();
let
arrayList
=
new
ArrayList
();
...
@@ -702,4 +702,20 @@ describe("ArraylistTest", function () {
...
@@ -702,4 +702,20 @@ describe("ArraylistTest", function () {
expect
(
arr
[
i
]).
assertEqual
(
a
[
i
]);
expect
(
arr
[
i
]).
assertEqual
(
a
[
i
]);
}
}
});
});
it
(
"
SR000GGR44_testRemoveByRange052
"
,
0
,
function
()
{
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
"
四
"
);
arrayList
.
add
(
"
三
"
);
arrayList
.
add
(
1
);
arrayList
.
add
(
"
a
"
);
arrayList
.
add
(
1
);
arrayList
.
add
(
"
b
"
);
arrayList
.
add
(
"
c
"
);
arrayList
.
add
(
1
);
arrayList
.
removeByRange
(
0
,
8
);
let
res
=
arrayList
.
length
;
let
res1
=
arrayList
.
getLastIndexOf
(
1
);
expect
(
res
).
assertEqual
(
1
);
expect
(
res1
).
assertEqual
(
0
);
});
});
});
compileruntime/containerLine_lib_standard/src/main/js/test/Vector.test.js
浏览文件 @
2196f7f8
...
@@ -534,7 +534,7 @@ describe("VectorTest", function () {
...
@@ -534,7 +534,7 @@ describe("VectorTest", function () {
vector
.
add
(
14
);
vector
.
add
(
14
);
let
arr1
=
[
"
a
"
,
"
b
"
,
"
c
"
];
let
arr1
=
[
"
a
"
,
"
b
"
,
"
c
"
];
vector
.
copyToArray
(
arr1
);
vector
.
copyToArray
(
arr1
);
let
a
=
[
"
a
"
,
"
b
"
,
"
c
"
,
4
,
3
,
1
];
let
a
=
[
"
a
"
,
"
b
"
,
"
c
"
,
4
,
3
,
1
];
for
(
let
i
=
0
;
i
<
a
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
a
.
length
;
i
++
)
{
expect
(
arr1
[
i
]).
assertEqual
(
a
[
i
]);
expect
(
arr1
[
i
]).
assertEqual
(
a
[
i
]);
}
}
...
...
compileruntime/containerRelation_lib_standard/src/main/js/test/PlainArray.test.js
浏览文件 @
2196f7f8
...
@@ -459,7 +459,6 @@ describe("PlainArrayTest", function () {
...
@@ -459,7 +459,6 @@ describe("PlainArrayTest", function () {
});
});
it
(
"
SR000GGR45_testAdd039
"
,
0
,
function
()
{
it
(
"
SR000GGR45_testAdd039
"
,
0
,
function
()
{
let
plainArray
=
new
PlainArray
();
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1.23
,
"
a
"
);
plainArray
.
add
(
-
2
,
"
b
"
);
plainArray
.
add
(
-
2
,
"
b
"
);
try
{
try
{
plainArray
.
add
(
"
a
"
,
"
c
"
);
plainArray
.
add
(
"
a
"
,
"
c
"
);
...
@@ -501,4 +500,16 @@ describe("PlainArrayTest", function () {
...
@@ -501,4 +500,16 @@ describe("PlainArrayTest", function () {
}
}
expect
(
flag
).
assertEqual
(
true
);
expect
(
flag
).
assertEqual
(
true
);
});
});
it
(
"
SR000GGR45_testAdd042
"
,
0
,
function
()
{
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
-
2
,
"
b
"
);
try
{
plainArray
.
add
(
1.23
,
"
a
"
);
}
catch
(
err
)
{
expect
(
err
.
name
).
assertEqual
(
"
TypeError
"
);
expect
(
err
.
message
).
assertEqual
(
"
the index is not integer
"
);
}
let
res
=
plainArray
.
get
(
-
2
);
expect
(
res
).
assertEqual
(
"
b
"
);
});
});
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录