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

This commit is contained in:
Rick Waldron 2018-02-15 15:51:40 -05:00 committed by Leo Balter
parent b85474508c
commit 319a5bdb08
13 changed files with 40 additions and 20 deletions

View File

@ -21,9 +21,9 @@ info: |
features: [Reflect.construct]
---*/
function DummyError() { }
function DummyError() {}
var newTarget = function(){}.bind(null);
var newTarget = function() {}.bind(null);
Object.defineProperty(newTarget, "prototype", {
get: function() {
throw new DummyError();

View File

@ -21,7 +21,7 @@ info: |
features: [Symbol, Reflect.construct]
---*/
function newTarget() { }
function newTarget() {}
newTarget.prototype = undefined;
var arrayBuffer = Reflect.construct(SharedArrayBuffer, [1], newTarget);

View File

@ -24,7 +24,7 @@ features: [Reflect.construct]
var arrayBuffer = Reflect.construct(SharedArrayBuffer, [8], Object);
assert.sameValue(Object.getPrototypeOf(arrayBuffer), Object.prototype, "NewTarget is built-in Object constructor");
var newTarget = function(){}.bind(null);
var newTarget = function() {}.bind(null);
Object.defineProperty(newTarget, "prototype", {
get: function() {
return Array.prototype;

View File

@ -12,6 +12,7 @@ info: |
var arrayBuffer = new SharedArrayBuffer(8);
var start = 6, end = undefined;
var start = 6,
end = undefined;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 2);

View File

@ -12,14 +12,17 @@ info: |
var arrayBuffer = new SharedArrayBuffer(8);
var start = 1, end = 12;
var start = 1,
end = 12;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 7, "slice(1, 12)");
var start = 2, end = 0x100000000;
var start = 2,
end = 0x100000000;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 6, "slice(2, 0x100000000)");
var start = 3, end = +Infinity;
var start = 3,
end = +Infinity;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 5, "slice(3, Infinity)");

View File

@ -12,14 +12,17 @@ info: |
var arrayBuffer = new SharedArrayBuffer(8);
var start = 2, end = -4;
var start = 2,
end = -4;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 2, "slice(2, -4)");
var start = 2, end = -10;
var start = 2,
end = -10;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 0, "slice(2, -10)");
var start = 2, end = -Infinity;
var start = 2,
end = -Infinity;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 0, "slice(2, -Infinity)");

View File

@ -12,14 +12,17 @@ info: |
var arrayBuffer = new SharedArrayBuffer(8);
var start = -5, end = 6;
var start = -5,
end = 6;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 3, "slice(-5, 6)");
var start = -12, end = 6;
var start = -12,
end = 6;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 6, "slice(-12, 6)");
var start = -Infinity, end = 6;
var start = -Infinity,
end = 6;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 6, "slice(-Infinity, 6)");

View File

@ -17,4 +17,6 @@ info: |
assert.sameValue(Object.prototype.hasOwnProperty.call(SharedArrayBuffer.prototype.slice, "prototype"), false);
var arrayBuffer = new SharedArrayBuffer(8);
assert.throws(TypeError, function() { new arrayBuffer.slice(); });
assert.throws(TypeError, function() {
new arrayBuffer.slice();
});

View File

@ -13,7 +13,9 @@ features: [Symbol]
var arrayBuffer = new SharedArrayBuffer(8);
function callSlice() { arrayBuffer.slice(); }
function callSlice() {
arrayBuffer.slice();
}
arrayBuffer.constructor = null;
assert.throws(TypeError, callSlice, "`constructor` value is null");

View File

@ -16,7 +16,9 @@ var speciesConstructor = {};
var arrayBuffer = new SharedArrayBuffer(8);
arrayBuffer.constructor = speciesConstructor;
function callSlice() { arrayBuffer.slice(); }
function callSlice() {
arrayBuffer.slice();
}
speciesConstructor[Symbol.species] = {};
assert.throws(TypeError, callSlice, "`constructor[Symbol.species]` value is Object");

View File

@ -16,7 +16,9 @@ var speciesConstructor = {};
var arrayBuffer = new SharedArrayBuffer(8);
arrayBuffer.constructor = speciesConstructor;
function callSlice() { arrayBuffer.slice(); }
function callSlice() {
arrayBuffer.slice();
}
speciesConstructor[Symbol.species] = true;
assert.throws(TypeError, callSlice, "`constructor[Symbol.species]` value is Boolean");

View File

@ -11,6 +11,7 @@ info: |
var arrayBuffer = new SharedArrayBuffer(8);
var start = undefined, end = 6;
var start = undefined,
end = 6;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 6);

View File

@ -12,6 +12,7 @@ info: |
var arrayBuffer = new SharedArrayBuffer(8);
var start = 5, end = 4;
var start = 5,
end = 4;
var result = arrayBuffer.slice(start, end);
assert.sameValue(result.byteLength, 0);