built-ins/Set/*: make all indentation consistent (depth & character) (#1431)

This commit is contained in:
Rick Waldron 2018-02-15 15:34:45 -05:00 committed by Leo Balter
parent a61b9cd671
commit af37c92af7
26 changed files with 74 additions and 59 deletions

View File

@ -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`"
);

View File

@ -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`"
);

View File

@ -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");

View File

@ -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`");

View File

@ -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`");

View File

@ -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`");

View File

@ -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");

View File

@ -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`"
);

View File

@ -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`");

View File

@ -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`");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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`"
);

View File

@ -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");

View File

@ -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`");

View File

@ -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`"
);

View File

@ -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");

View File

@ -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");

View File

@ -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);

View File

@ -15,6 +15,7 @@ features: [Symbol.iterator]
---*/
var iterable = {};
function MyError() {};
iterable[Symbol.iterator] = function() {
return {

View File

@ -17,6 +17,7 @@ features: [Symbol.iterator]
var count = 0;
var iterable = {};
function MyError() {}
iterable[Symbol.iterator] = function() {
return {

View File

@ -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`"
);

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {