Skip to content
Snippets Groups Projects
Commit af37c92a authored by Rick Waldron's avatar Rick Waldron Committed by Leo Balter
Browse files

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

parent a61b9cd6
No related branches found
No related tags found
No related merge requests found
Showing
with 54 additions and 50 deletions
......@@ -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`"
);
......@@ -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`"
);
......@@ -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");
......
......@@ -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`");
......@@ -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`");
......
......@@ -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`");
......
......@@ -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");
......
......@@ -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`"
);
......@@ -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`");
......
......@@ -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`");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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`"
);
......@@ -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");
......
......@@ -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`");
......@@ -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`"
);
......@@ -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");
......
......@@ -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");
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment