提交 91bd09ad 编写于 作者: Z zhoufei

Modify the definition of copyToArray (array: array < T >) in vector

Description:
    1.Previously, copytoarray directly replaced the element in the vector to the
    corresponding position of the parameter array.
    2.Now, add elements equal to the number of elements in the array after the array.
    #I58TLT:Modify the definition of copyToArray (array: array < T >) in vector
Signed-off-by: Nzhoufei <zhoufei38@huawei.com>
上级 a60b075e
......@@ -533,8 +533,8 @@ describe("VectorTest", function () {
vector.add(2);
vector.add(14);
let arr1 = ["a", "b", "c"];
let res = vector.copyToArray(arr1);
let a = [4, 3, 1];
vector.copyToArray(arr1);
let a = ["a", "b", "c",4, 3, 1];
for (let i = 0; i < a.length; i++) {
expect(arr1[i]).assertEqual(a[i]);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册