diff options
Diffstat (limited to 'test/built-ins/Array/from/source-object-iterator-1.js')
-rw-r--r-- | test/built-ins/Array/from/source-object-iterator-1.js | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/test/built-ins/Array/from/source-object-iterator-1.js b/test/built-ins/Array/from/source-object-iterator-1.js index 94834b5cf..6ac364ac5 100644 --- a/test/built-ins/Array/from/source-object-iterator-1.js +++ b/test/built-ins/Array/from/source-object-iterator-1.js @@ -8,23 +8,25 @@ es6id: 22.1.2.1 features: [Symbol.iterator] ---*/ -var array = [ 2, 4, 8, 16, 32, 64, 128 ]; +var array = [2, 4, 8, 16, 32, 64, 128]; var obj = { - [Symbol.iterator]() { - return { - index: 0, - next() { - throw new Test262Error(); - }, - isDone : false, - get val() { - this.index++; - if (this.index > 7) { - this.isDone = true; - } - return 1 << this.index; - } - }; - } + [Symbol.iterator]() { + return { + index: 0, + next() { + throw new Test262Error(); + }, + isDone: false, + get val() { + this.index++; + if (this.index > 7) { + this.isDone = true; + } + return 1 << this.index; + } + }; + } }; -assert.throws(Test262Error, function(){Array.from(obj);}); +assert.throws(Test262Error, function() { + Array.from(obj); +}); |