提交 8b29cb2a 编写于 作者: M mahaifeng

[array-buffer]copyewith的测试用例

上级 32942058
...@@ -76,19 +76,6 @@ export class TFloat64Array { ...@@ -76,19 +76,6 @@ export class TFloat64Array {
float64.set([1, 2, 3], 1); float64.set([1, 2, 3], 1);
float64.copyWithin(3, 0, 3); float64.copyWithin(3, 0, 3);
expect(float64.toString()).toEqual("0,1,2,0,1,2,0,0"); expect(float64.toString()).toEqual("0,1,2,0,1,2,0,0");
let initialLargeArray : Array<number> = new Array(10000, 0);
for (let i = 0; i < 5000; ++i) {
initialLargeArray[i] = i;
}
let initialLargeFloat64Array = new Float64Array(initialLargeArray);
let largeFloat64Array : Float64Array = new Float64Array(initialLargeFloat64Array);
largeFloat64Array.copyWithin(5000, 0);
for (let i = 0; i < 5000; ++i) {
if (largeFloat64Array[i + 5000] !== i) {
expect(true).toEqual(false);
}
}
// #END // #END
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册