Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: test/mjsunit/es6/array-concat.js

Issue 1804963002: [builtins] Fix Array.prototype.concat bug (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: polishing corner cases and making tests work Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/array-concat.js ('k') | test/mjsunit/regress/regress-crbug-594574-concat-leak-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/array-concat.js
diff --git a/test/mjsunit/es6/array-concat.js b/test/mjsunit/es6/array-concat.js
index 801c225e7adab0035e947b135b1224df7a06f711..f22d038afe2d6b61cec8d2980ad4e3ea46518d09 100644
--- a/test/mjsunit/es6/array-concat.js
+++ b/test/mjsunit/es6/array-concat.js
@@ -267,30 +267,22 @@ function testConcatTypedArray(type, elems, modulo) {
}
(function testConcatSmallTypedArray() {
- var max = [Math.pow(2, 8), Math.pow(2, 16), Math.pow(2, 32), false, false];
- [
- Uint8Array,
- Uint16Array,
- Uint32Array,
- Float32Array,
- Float64Array
- ].forEach(function(ctor, i) {
- testConcatTypedArray(ctor, 1, max[i]);
- });
+ var length = 1;
+ testConcatTypedArray(Uint8Array, length, Math.pow(2, 8));
+ testConcatTypedArray(Uint16Array, length, Math.pow(2, 16));
+ testConcatTypedArray(Uint32Array, length, Math.pow(2, 32));
+ testConcatTypedArray(Float32Array, length, false);
+ testConcatTypedArray(Float64Array, length, false);
})();
(function testConcatLargeTypedArray() {
- var max = [Math.pow(2, 8), Math.pow(2, 16), Math.pow(2, 32), false, false];
- [
- Uint8Array,
- Uint16Array,
- Uint32Array,
- Float32Array,
- Float64Array
- ].forEach(function(ctor, i) {
- testConcatTypedArray(ctor, 4000, max[i]);
- });
+ var length = 4000;
+ testConcatTypedArray(Uint8Array, length, Math.pow(2, 8));
+ testConcatTypedArray(Uint16Array, length, Math.pow(2, 16));
+ testConcatTypedArray(Uint32Array, length, Math.pow(2, 32));
+ testConcatTypedArray(Float32Array, length, false);
+ testConcatTypedArray(Float64Array, length, false);
})();
« no previous file with comments | « test/mjsunit/array-concat.js ('k') | test/mjsunit/regress/regress-crbug-594574-concat-leak-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698