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

This commit is contained in:
Rick Waldron 2018-02-15 15:41:09 -05:00 committed by Leo Balter
parent 621d34d5ea
commit bc70e0339f
13 changed files with 52 additions and 13 deletions

View File

@ -13,7 +13,10 @@ features: [cross-realm]
---*/
var other = $262.createRealm().global;
var localArgs = function(){ "use strict"; return arguments; }();
var localArgs = function() {
"use strict";
return arguments;
}();
var otherArgs = (new other.Function('return arguments;'))();
var localThrowTypeError = Object.getOwnPropertyDescriptor(localArgs, "callee").get;
var otherThrowTypeError = Object.getOwnPropertyDescriptor(otherArgs, "callee").get;

View File

@ -12,6 +12,9 @@ info: |
function is false.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(Object.isExtensible(ThrowTypeError), false);

View File

@ -25,6 +25,9 @@ info: |
properties.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(Object.prototype.hasOwnProperty.call(ThrowTypeError, "arguments"), false);

View File

@ -25,6 +25,9 @@ info: |
properties.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(Object.prototype.hasOwnProperty.call(ThrowTypeError, "caller"), false);

View File

@ -14,6 +14,9 @@ info: |
{ [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(Object.isFrozen(ThrowTypeError), true);

View File

@ -12,6 +12,9 @@ info: |
object that is defined once for each realm.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(typeof ThrowTypeError, "function");

View File

@ -13,7 +13,10 @@ info: |
includes: [propertyHelper.js]
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(ThrowTypeError.length, 0);

View File

@ -12,6 +12,9 @@ info: |
object that is defined once for each Realm.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(Object.prototype.hasOwnProperty.call(ThrowTypeError, "name"), false);

View File

@ -19,6 +19,9 @@ info: |
...
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.sameValue(Object.getPrototypeOf(ThrowTypeError), Function.prototype);

View File

@ -13,7 +13,10 @@ info: |
1. Throw a TypeError exception.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
assert.throws(TypeError, function() {
ThrowTypeError();

View File

@ -12,7 +12,10 @@ info: |
object that is defined once for each realm.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
// Test with Function.prototype.arguments and Function.prototype.caller properties.
var argumentsDesc = Object.getOwnPropertyDescriptor(Function.prototype, "arguments");

View File

@ -12,7 +12,10 @@ info: |
object that is defined once for each realm.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
// Test with unmapped arguments object from function with non-simple parameters list.
function nonSimple(a = 0) {

View File

@ -12,7 +12,10 @@ info: |
object that is defined once for each realm.
---*/
var ThrowTypeError = Object.getOwnPropertyDescriptor(function(){ "use strict"; return arguments; }(), "callee").get;
var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
"use strict";
return arguments;
}(), "callee").get;
// Test with unmapped arguments object from strict-mode function.
function strictFn() {