提交 d9abeaa1 编写于 作者: W wangyong

Modify the removebyrange test case of ArrayList

Description:
     1.Modify the removebyrange test case of ArrayList
     #I5DLLN:Modify the removebyrange test case of ArrayList
Signed-off-by: Nwangyong <wangyong237@huawei.com>
上级 307065ae
...@@ -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);
});
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册