mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
built-ins/SharedArrayBuffer/*: make all indentation consistent (depth & character) (#1426)
This commit is contained in:
parent
b85474508c
commit
319a5bdb08
@ -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();
|
||||
|
@ -21,7 +21,7 @@ info: |
|
||||
features: [Symbol, Reflect.construct]
|
||||
---*/
|
||||
|
||||
function newTarget() { }
|
||||
function newTarget() {}
|
||||
|
||||
newTarget.prototype = undefined;
|
||||
var arrayBuffer = Reflect.construct(SharedArrayBuffer, [1], newTarget);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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)");
|
||||
|
@ -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)");
|
||||
|
@ -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)");
|
||||
|
@ -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();
|
||||
});
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user