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

Unified Diff: test/mjsunit/array-iteration.js

Issue 1415783006: Revert of [runtime] Fix ES6 9.2.1 [[Call]] when encountering a classConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/x64/macro-assembler-x64.cc ('k') | test/mjsunit/es6/classes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-iteration.js
diff --git a/test/mjsunit/array-iteration.js b/test/mjsunit/array-iteration.js
index 9d03ed13ce976b31161668183bfe7552ffcf4cbd..13240740fc24eab3b1249b6105b404b645499023 100644
--- a/test/mjsunit/array-iteration.js
+++ b/test/mjsunit/array-iteration.js
@@ -45,22 +45,17 @@
// Use specified object as this object when calling the function.
var o = { value: 42 }
a = [1,42,3,42,4];
- assertArrayEquals([42,42],
- a.filter(function(n) { return this.value == n }, o))
+ assertArrayEquals([42,42], a.filter(function(n) { return this.value == n }, o))
// Modify original array.
a = [1,42,3,42,4];
- assertArrayEquals([42,42],
- a.filter(function(n, index, array) {
- array[index] = 43; return 42 == n;
- }));
+ assertArrayEquals([42,42], a.filter(function(n, index, array) { array[index] = 43; return 42 == n; }));
assertArrayEquals([43,43,43,43,43], a);
// Only loop through initial part of array eventhough elements are
// added.
a = [1,1];
- assertArrayEquals([],
- a.filter(function(n, index, array) { array.push(n+1); return n == 2; }));
+ assertArrayEquals([], a.filter(function(n, index, array) { array.push(n+1); return n == 2; }));
assertArrayEquals([1,1,2,2], a);
// Respect holes.
@@ -171,19 +166,13 @@
// Modify original array.
a = [0,1];
- assertFalse(
- a.every(function(n, index, array) {
- array[index] = n + 1; return n == 1;
- }));
+ assertFalse(a.every(function(n, index, array) { array[index] = n + 1; return n == 1;}));
assertArrayEquals([1,1], a);
// Only loop through initial part of array eventhough elements are
// added.
a = [1,1];
- assertTrue(
- a.every(function(n, index, array) {
- array.push(n + 1); return n == 1;
- }));
+ assertTrue(a.every(function(n, index, array) { array.push(n + 1); return n == 1;}));
assertArrayEquals([1,1,2,2], a);
// Respect holes.
@@ -232,18 +221,14 @@
// Modify original array.
a = [0,1,2,3,4];
result = [1,2,3,4,5];
- assertArrayEquals(result,
- a.map(function(n, index, array) {
- array[index] = n + 1; return n + 1;
- }));
+ assertArrayEquals(result, a.map(function(n, index, array) { array[index] = n + 1; return n + 1;}));
assertArrayEquals(result, a);
// Only loop through initial part of array eventhough elements are
// added.
a = [0,1,2,3,4];
result = [1,2,3,4,5];
- assertArrayEquals(result,
- a.map(function(n, index, array) { array.push(n); return n + 1; }));
+ assertArrayEquals(result, a.map(function(n, index, array) { array.push(n); return n + 1;}));
assertArrayEquals([0,1,2,3,4,0,1,2,3,4], a);
// Respect holes.
@@ -290,15 +275,12 @@
// Modify original array.
a = [0,1,2,3];
- assertTrue(
- a.some(function(n, index, array) {
- array[index] = n + 1; return n == 2; }));
+ assertTrue(a.some(function(n, index, array) { array[index] = n + 1; return n == 2; }));
assertArrayEquals([1,2,3,3], a);
// Only loop through initial part when elements are added.
a = [0,1,2];
- assertFalse(
- a.some(function(n, index, array) { array.push(42); return n == 42; }));
+ assertFalse(a.some(function(n, index, array) { array.push(42); return n == 42; }));
assertArrayEquals([0,1,2,42,42,42], a);
// Respect holes.
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/mjsunit/es6/classes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698