提交 7e53dffa 编写于 作者: L liu-ganlin

update containers remove method

Signed-off-by: Nliu-ganlin <liuganlin@huawei.com>
上级 7e5ce65b
...@@ -422,8 +422,6 @@ arrayList.add(4); ...@@ -422,8 +422,6 @@ arrayList.add(4);
arrayList.add(5); arrayList.add(5);
arrayList.add(4); arrayList.add(4);
arrayList.removeByRange(2, 4); arrayList.removeByRange(2, 4);
arrayList.removeByRange(4, 3);
arrayList.removeByRange(2, 6);
try { try {
arraylist.removeByRange.bind({}, 2, 4)(); // bind为JS标准内置对象Function的方法,用于改变this的指向,测试异常捕获 arraylist.removeByRange.bind({}, 2, 4)(); // bind为JS标准内置对象Function的方法,用于改变this的指向,测试异常捕获
} catch(err) { } catch(err) {
......
...@@ -465,7 +465,6 @@ remove(key: number): T ...@@ -465,7 +465,6 @@ remove(key: number): T
let plainArray = new PlainArray(); let plainArray = new PlainArray();
plainArray.add(1, "squirrel"); plainArray.add(1, "squirrel");
plainArray.add(2, "sparrow"); plainArray.add(2, "sparrow");
plainArray.remove(2);
let result = plainArray.remove(2); let result = plainArray.remove(2);
try { try {
plainArray.remove.bind({}, 2)(); // bind为JS标准内置对象Function的方法,用于改变this的指向,测试异常捕获 plainArray.remove.bind({}, 2)(); // bind为JS标准内置对象Function的方法,用于改变this的指向,测试异常捕获
...@@ -509,7 +508,6 @@ removeAt(index: number): T ...@@ -509,7 +508,6 @@ removeAt(index: number): T
let plainArray = new PlainArray(); let plainArray = new PlainArray();
plainArray.add(1, "squirrel"); plainArray.add(1, "squirrel");
plainArray.add(2, "sparrow"); plainArray.add(2, "sparrow");
plainArray.removeAt(1);
let result = plainArray.removeAt(1); let result = plainArray.removeAt(1);
try { try {
plainArray.removeAt.bind({}, 1)(); // bind为JS标准内置对象Function的方法,用于改变this的指向,测试异常捕获 plainArray.removeAt.bind({}, 1)(); // bind为JS标准内置对象Function的方法,用于改变this的指向,测试异常捕获
......
...@@ -285,7 +285,6 @@ vector.add(4); ...@@ -285,7 +285,6 @@ vector.add(4);
vector.add(5); vector.add(5);
vector.add(4); vector.add(4);
vector.removeByRange(2,4); vector.removeByRange(2,4);
vector.removeByRange(2,6);
``` ```
### replaceAllElements ### replaceAllElements
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册