From d9abeaa17d11e5bee2ed6ff859fe3d824766ce3c Mon Sep 17 00:00:00 2001 From: wangyong Date: Wed, 22 Jun 2022 18:34:19 +0800 Subject: [PATCH] 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: wangyong --- .../src/main/js/test/ArrayList.test.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/compileruntime/containerLine_lib_standard/src/main/js/test/ArrayList.test.js b/compileruntime/containerLine_lib_standard/src/main/js/test/ArrayList.test.js index 52076df77..12e5df40e 100644 --- a/compileruntime/containerLine_lib_standard/src/main/js/test/ArrayList.test.js +++ b/compileruntime/containerLine_lib_standard/src/main/js/test/ArrayList.test.js @@ -533,8 +533,8 @@ describe("ArraylistTest", function () { arrayList.removeByRange(0, 9); let res = arrayList.length; let res1 = arrayList.getLastIndexOf(1); - expect(res).assertEqual(1); - expect(res1).assertEqual(0); + expect(res).assertEqual(0); + expect(res1).assertEqual(-1); }); it("SR000GGR44_testSubArrayList040", 0, function () { let arrayList = new ArrayList(); @@ -702,4 +702,20 @@ describe("ArraylistTest", function () { 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); + }); }); -- GitLab