From af37c92af7691eaf4769eb1f5f44f92a4a883426 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Thu, 15 Feb 2018 15:34:45 -0500 Subject: [PATCH] built-ins/Set/*: make all indentation consistent (depth & character) (#1431) --- .../Set/properties-of-the-set-prototype-object.js | 6 +++--- test/built-ins/Set/prototype-of-set.js | 6 +++--- test/built-ins/Set/prototype/add/add.js | 6 +++--- .../add/returns-this-when-ignoring-duplicate.js | 2 +- .../will-not-add-duplicate-entry-initial-iterable.js | 2 +- .../will-not-add-duplicate-entry-normalizes-zero.js | 2 +- test/built-ins/Set/prototype/clear/clear.js | 6 +++--- .../set-prototype-constructor-intrinsic.js | 6 +++--- .../delete/delete-entry-initial-iterable.js | 2 +- .../prototype/delete/delete-entry-normalizes-zero.js | 2 +- test/built-ins/Set/prototype/delete/delete.js | 6 +++--- test/built-ins/Set/prototype/entries/entries.js | 6 +++--- test/built-ins/Set/prototype/forEach/forEach.js | 6 +++--- .../Set/prototype/forEach/returns-undefined.js | 6 +++--- test/built-ins/Set/prototype/has/has.js | 6 +++--- ...-undefined-added-deleted-not-present-undefined.js | 1 - test/built-ins/Set/prototype/keys/keys.js | 6 +++--- test/built-ins/Set/prototype/size/size.js | 12 ++++++------ test/built-ins/Set/prototype/values/values.js | 6 +++--- .../Set/set-iterator-close-after-add-failure.js | 9 +++++++-- test/built-ins/Set/set-iterator-next-failure.js | 1 + test/built-ins/Set/set-iterator-value-failure.js | 1 + test/built-ins/Set/set-newtarget.js | 12 ++++++------ .../next/this-not-object-throw-keys.js | 5 ++++- .../next/this-not-object-throw-prototype-iterator.js | 5 ++++- .../next/this-not-object-throw-values.js | 5 ++++- 26 files changed, 74 insertions(+), 59 deletions(-) diff --git a/test/built-ins/Set/properties-of-the-set-prototype-object.js b/test/built-ins/Set/properties-of-the-set-prototype-object.js index ad46ab8167..f32c807588 100644 --- a/test/built-ins/Set/properties-of-the-set-prototype-object.js +++ b/test/built-ins/Set/properties-of-the-set-prototype-object.js @@ -11,7 +11,7 @@ description: > ---*/ assert.sameValue( - Object.getPrototypeOf(Set.prototype), - Object.prototype, - "`Object.getPrototypeOf(Set.prototype)` returns `Object.prototype`" + Object.getPrototypeOf(Set.prototype), + Object.prototype, + "`Object.getPrototypeOf(Set.prototype)` returns `Object.prototype`" ); diff --git a/test/built-ins/Set/prototype-of-set.js b/test/built-ins/Set/prototype-of-set.js index fe5f45fb1e..966ec80dfd 100644 --- a/test/built-ins/Set/prototype-of-set.js +++ b/test/built-ins/Set/prototype-of-set.js @@ -8,7 +8,7 @@ description: > ---*/ assert.sameValue( - Object.getPrototypeOf(Set), - Function.prototype, - "`Object.getPrototypeOf(Set)` returns `Function.prototype`" + Object.getPrototypeOf(Set), + Function.prototype, + "`Object.getPrototypeOf(Set)` returns `Function.prototype`" ); diff --git a/test/built-ins/Set/prototype/add/add.js b/test/built-ins/Set/prototype/add/add.js index f902a2134e..775cd37a8f 100644 --- a/test/built-ins/Set/prototype/add/add.js +++ b/test/built-ins/Set/prototype/add/add.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - typeof Set.prototype.add, - "function", - "`typeof Set.prototype.add` is `'function'`" + typeof Set.prototype.add, + "function", + "`typeof Set.prototype.add` is `'function'`" ); verifyNotEnumerable(Set.prototype, "add"); diff --git a/test/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js b/test/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js index ae21ec5e07..37519db7ef 100644 --- a/test/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js +++ b/test/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js @@ -14,6 +14,6 @@ description: > ---*/ -var s = new Set([ 1 ]); +var s = new Set([1]); assert.sameValue(s.add(1), s, "`s.add(1)` returns `s`"); diff --git a/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js b/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js index 0298ce8086..6704819462 100644 --- a/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js +++ b/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js @@ -16,7 +16,7 @@ description: > ---*/ -var s = new Set([ 1 ]); +var s = new Set([1]); assert.sameValue(s.size, 1, "The value of `s.size` is `1`"); diff --git a/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js b/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js index b7749a9dc6..7ea0c2f466 100644 --- a/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js +++ b/test/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js @@ -16,7 +16,7 @@ description: > ---*/ -var s = new Set([ -0 ]); +var s = new Set([-0]); assert.sameValue(s.size, 1, "The value of `s.size` is `1`"); diff --git a/test/built-ins/Set/prototype/clear/clear.js b/test/built-ins/Set/prototype/clear/clear.js index 98a5dfd952..3d770e4c96 100644 --- a/test/built-ins/Set/prototype/clear/clear.js +++ b/test/built-ins/Set/prototype/clear/clear.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - typeof Set.prototype.clear, - "function", - "`typeof Set.prototype.clear` is `'function'`" + typeof Set.prototype.clear, + "function", + "`typeof Set.prototype.clear` is `'function'`" ); verifyNotEnumerable(Set.prototype, "clear"); diff --git a/test/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js b/test/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js index 73930249cb..b60455a021 100644 --- a/test/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js +++ b/test/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js @@ -10,7 +10,7 @@ description: > ---*/ assert.sameValue( - Set.prototype.constructor, - Set, - "The value of `Set.prototype.constructor` is `Set`" + Set.prototype.constructor, + Set, + "The value of `Set.prototype.constructor` is `Set`" ); diff --git a/test/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js b/test/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js index 6dbdb631ed..eac255331f 100644 --- a/test/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js +++ b/test/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js @@ -16,7 +16,7 @@ description: > ---*/ -var s = new Set([ 1 ]); +var s = new Set([1]); assert.sameValue(s.size, 1, "The value of `s.size` is `1`"); diff --git a/test/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js b/test/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js index 15ed3a2e1e..1726e96cd2 100644 --- a/test/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js +++ b/test/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js @@ -15,7 +15,7 @@ description: > ---*/ -var s = new Set([ -0 ]); +var s = new Set([-0]); assert.sameValue(s.size, 1, "The value of `s.size` is `1`"); diff --git a/test/built-ins/Set/prototype/delete/delete.js b/test/built-ins/Set/prototype/delete/delete.js index f654ca200e..772a742d05 100644 --- a/test/built-ins/Set/prototype/delete/delete.js +++ b/test/built-ins/Set/prototype/delete/delete.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - typeof Set.prototype.delete, - "function", - "`typeof Set.prototype.delete` is `'function'`" + typeof Set.prototype.delete, + "function", + "`typeof Set.prototype.delete` is `'function'`" ); verifyNotEnumerable(Set.prototype, "delete"); diff --git a/test/built-ins/Set/prototype/entries/entries.js b/test/built-ins/Set/prototype/entries/entries.js index 05bd329341..8bed7599a5 100644 --- a/test/built-ins/Set/prototype/entries/entries.js +++ b/test/built-ins/Set/prototype/entries/entries.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - typeof Set.prototype.entries, - "function", - "`typeof Set.prototype.entries` is `'function'`" + typeof Set.prototype.entries, + "function", + "`typeof Set.prototype.entries` is `'function'`" ); verifyNotEnumerable(Set.prototype, "entries"); diff --git a/test/built-ins/Set/prototype/forEach/forEach.js b/test/built-ins/Set/prototype/forEach/forEach.js index 92d63cfd39..49ba06e754 100644 --- a/test/built-ins/Set/prototype/forEach/forEach.js +++ b/test/built-ins/Set/prototype/forEach/forEach.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - typeof Set.prototype.forEach, - "function", - "`typeof Set.prototype.forEach` is `'function'`" + typeof Set.prototype.forEach, + "function", + "`typeof Set.prototype.forEach` is `'function'`" ); verifyNotEnumerable(Set.prototype, "forEach"); diff --git a/test/built-ins/Set/prototype/forEach/returns-undefined.js b/test/built-ins/Set/prototype/forEach/returns-undefined.js index b3e1b02c39..7b04f84610 100644 --- a/test/built-ins/Set/prototype/forEach/returns-undefined.js +++ b/test/built-ins/Set/prototype/forEach/returns-undefined.js @@ -13,7 +13,7 @@ description: > var s = new Set([1]); assert.sameValue( - s.forEach(function() {}), - undefined, - "`s.forEach(function() {})` returns `undefined`" + s.forEach(function() {}), + undefined, + "`s.forEach(function() {})` returns `undefined`" ); diff --git a/test/built-ins/Set/prototype/has/has.js b/test/built-ins/Set/prototype/has/has.js index dae711e14b..7a2604657a 100644 --- a/test/built-ins/Set/prototype/has/has.js +++ b/test/built-ins/Set/prototype/has/has.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - typeof Set.prototype.has, - "function", - "`typeof Set.prototype.has` is `'function'`" + typeof Set.prototype.has, + "function", + "`typeof Set.prototype.has` is `'function'`" ); verifyNotEnumerable(Set.prototype, "has"); diff --git a/test/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js b/test/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js index 78e71e4994..b785272e12 100644 --- a/test/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js +++ b/test/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js @@ -19,4 +19,3 @@ var result = s.delete(undefined); assert.sameValue(s.has(undefined), false, "`s.has(undefined)` returns `false`"); assert.sameValue(result, true, "The result of `s.delete(undefined)` is `true`"); - diff --git a/test/built-ins/Set/prototype/keys/keys.js b/test/built-ins/Set/prototype/keys/keys.js index 7b3f8a0b8b..f5065081a2 100644 --- a/test/built-ins/Set/prototype/keys/keys.js +++ b/test/built-ins/Set/prototype/keys/keys.js @@ -9,7 +9,7 @@ ---*/ assert.sameValue( - Set.prototype.keys, - Set.prototype.values, - "The value of `Set.prototype.keys` is `Set.prototype.values`" + Set.prototype.keys, + Set.prototype.values, + "The value of `Set.prototype.keys` is `Set.prototype.values`" ); diff --git a/test/built-ins/Set/prototype/size/size.js b/test/built-ins/Set/prototype/size/size.js index d3c6c401bf..db02a7bbbc 100644 --- a/test/built-ins/Set/prototype/size/size.js +++ b/test/built-ins/Set/prototype/size/size.js @@ -13,14 +13,14 @@ includes: [propertyHelper.js] var descriptor = Object.getOwnPropertyDescriptor(Set.prototype, "size"); assert.sameValue( - typeof descriptor.get, - "function", - "`typeof descriptor.get` is `'function'`" + typeof descriptor.get, + "function", + "`typeof descriptor.get` is `'function'`" ); assert.sameValue( - typeof descriptor.set, - "undefined", - "`typeof descriptor.set` is `\"undefined\"`" + typeof descriptor.set, + "undefined", + "`typeof descriptor.set` is `\"undefined\"`" ); verifyNotEnumerable(Set.prototype, "size"); diff --git a/test/built-ins/Set/prototype/values/values.js b/test/built-ins/Set/prototype/values/values.js index e58e932636..4f9121c9f2 100644 --- a/test/built-ins/Set/prototype/values/values.js +++ b/test/built-ins/Set/prototype/values/values.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - typeof Set.prototype.values, - "function", - "`typeof Set.prototype.values` is `'function'`" + typeof Set.prototype.values, + "function", + "`typeof Set.prototype.values` is `'function'`" ); verifyNotEnumerable(Set.prototype, "values"); diff --git a/test/built-ins/Set/set-iterator-close-after-add-failure.js b/test/built-ins/Set/set-iterator-close-after-add-failure.js index fa2c30b9db..ad077f6330 100644 --- a/test/built-ins/Set/set-iterator-close-after-add-failure.js +++ b/test/built-ins/Set/set-iterator-close-after-add-failure.js @@ -25,14 +25,19 @@ var iterable = {}; iterable[Symbol.iterator] = function() { return { next: function() { - return { value: null, done: false }; + return { + value: null, + done: false + }; }, return: function() { count += 1; } }; }; -Set.prototype.add = function() { throw new Error(); } +Set.prototype.add = function() { + throw new Error(); +} assert.throws(Error, function() { new Set(iterable); diff --git a/test/built-ins/Set/set-iterator-next-failure.js b/test/built-ins/Set/set-iterator-next-failure.js index 9879baf9bf..171abef9c5 100644 --- a/test/built-ins/Set/set-iterator-next-failure.js +++ b/test/built-ins/Set/set-iterator-next-failure.js @@ -15,6 +15,7 @@ features: [Symbol.iterator] ---*/ var iterable = {}; + function MyError() {}; iterable[Symbol.iterator] = function() { return { diff --git a/test/built-ins/Set/set-iterator-value-failure.js b/test/built-ins/Set/set-iterator-value-failure.js index 04e943a419..ac45b116fa 100644 --- a/test/built-ins/Set/set-iterator-value-failure.js +++ b/test/built-ins/Set/set-iterator-value-failure.js @@ -17,6 +17,7 @@ features: [Symbol.iterator] var count = 0; var iterable = {}; + function MyError() {} iterable[Symbol.iterator] = function() { return { diff --git a/test/built-ins/Set/set-newtarget.js b/test/built-ins/Set/set-newtarget.js index fb7cd1d67c..d5d9613e0c 100644 --- a/test/built-ins/Set/set-newtarget.js +++ b/test/built-ins/Set/set-newtarget.js @@ -16,15 +16,15 @@ description: > var s1 = new Set(); assert.sameValue( - Object.getPrototypeOf(s1), - Set.prototype, - "`Object.getPrototypeOf(s1)` returns `Set.prototype`" + Object.getPrototypeOf(s1), + Set.prototype, + "`Object.getPrototypeOf(s1)` returns `Set.prototype`" ); var s2 = new Set([1, 2]); assert.sameValue( - Object.getPrototypeOf(s2), - Set.prototype, - "`Object.getPrototypeOf(s2)` returns `Set.prototype`" + Object.getPrototypeOf(s2), + Set.prototype, + "`Object.getPrototypeOf(s2)` returns `Set.prototype`" ); diff --git a/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-keys.js b/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-keys.js index 6f1269bdb3..8f2562fe9e 100644 --- a/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-keys.js +++ b/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-keys.js @@ -17,7 +17,10 @@ features: - Symbol.iterator ---*/ -var set = new Set([[1, 11], [2, 22]]); +var set = new Set([ + [1, 11], + [2, 22] +]); var iterator = set.keys(); assert.throws(TypeError, function() { diff --git a/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-prototype-iterator.js b/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-prototype-iterator.js index 1d589b0fe6..1c622ba8dd 100644 --- a/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-prototype-iterator.js +++ b/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-prototype-iterator.js @@ -17,7 +17,10 @@ features: - Symbol.iterator ---*/ -var set = new Set([[1, 11], [2, 22]]); +var set = new Set([ + [1, 11], + [2, 22] +]); var iterator = set[Symbol.iterator](); assert.throws(TypeError, function() { diff --git a/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-values.js b/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-values.js index 04e44f9856..a5f0c47cfc 100644 --- a/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-values.js +++ b/test/built-ins/SetIteratorPrototype/next/this-not-object-throw-values.js @@ -17,7 +17,10 @@ features: - Symbol.iterator ---*/ -var set = new Set([[1, 11], [2, 22]]); +var set = new Set([ + [1, 11], + [2, 22] +]); var iterator = set.values(); assert.throws(TypeError, function() {