mirror of
https://github.com/tc39/test262.git
synced 2025-09-24 18:48:29 +02:00
Remove print calls in sm/Function
This commit is contained in:
parent
2181096f22
commit
59e1f5ae4f
@ -8,17 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Function.prototype.apply should accept any arraylike arguments
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 562448;
|
||||
var summary = 'Function.prototype.apply should accept any arraylike arguments';
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
function expectTypeError(fun, msg)
|
||||
{
|
||||
@ -242,7 +234,3 @@ assert.sameValue(res[3], 8, "wrong ret[0]");
|
||||
|
||||
strictArgsAsArray.apply(17, argsAccessors);
|
||||
assert.sameValue(seenThis, 17, "saw wrong this");
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
@ -11,6 +11,7 @@ description: |
|
||||
pending
|
||||
esid: pending
|
||||
---*/
|
||||
|
||||
assert.sameValue(new Function(
|
||||
"eval('var foo = 915805');" +
|
||||
"return foo;"
|
||||
@ -24,7 +25,3 @@ assert.sameValue(new Function(
|
||||
"return foo;"
|
||||
)()(),
|
||||
915805);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
arguments.caller and arguments.callee are poison pills in ES5, later changed in ES2017 to only poison pill arguments.callee.
|
||||
esid: pending
|
||||
---*/
|
||||
var gTestfile = 'arguments-caller-callee.js';
|
||||
var BUGNUMBER = 514563;
|
||||
var summary = "arguments.caller and arguments.callee are poison pills in ES5, " +
|
||||
"later changed in ES2017 to only poison pill arguments.callee.";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
// behavior
|
||||
|
||||
@ -62,8 +52,3 @@ assert.sameValue("get" in argsCallee, true);
|
||||
assert.sameValue("set" in argsCallee, true);
|
||||
assert.sameValue(argsCallee.get, canonicalTTE);
|
||||
assert.sameValue(argsCallee.set, canonicalTTE);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
GetElem for modified arguments shouldn't be optimized to get original argument.
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 1263811;
|
||||
var summary = "GetElem for modified arguments shouldn't be optimized to get original argument.";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
function testModifyFirst() {
|
||||
function f() {
|
||||
@ -39,4 +35,3 @@ function testModifyLater() {
|
||||
f(10, 20);
|
||||
}
|
||||
testModifyLater();
|
||||
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js, deepEqual.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Implement arguments[@@iterator].
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 992617;
|
||||
var summary = "Implement arguments[@@iterator].";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// MappedArgumentsObject
|
||||
let mapped = [
|
||||
@ -173,4 +169,3 @@ function f([a], b, c) {
|
||||
}
|
||||
f([1], 2, 3);
|
||||
`), "values");
|
||||
|
||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Attributes for properties of arguments objects
|
||||
esid: pending
|
||||
---*/
|
||||
var gTestfile = 'arguments-property-attributes.js';
|
||||
var BUGNUMBER = 516255;
|
||||
var summary = "Attributes for properties of arguments objects";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
// normal
|
||||
|
||||
@ -96,8 +87,3 @@ assert.sameValue(strictLengthDesc.value, 2);
|
||||
assert.sameValue(strictLengthDesc.writable, true);
|
||||
assert.sameValue(strictLengthDesc.enumerable, false);
|
||||
assert.sameValue(strictLengthDesc.configurable, true);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
@ -6,15 +6,10 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
A function created by Function constructor shouldn't have anonymous binding
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 636635;
|
||||
var summary = "A function created by Function constructor shouldn't have anonymous binding";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
assert.sameValue(new Function("return typeof anonymous")(), "undefined");
|
||||
assert.sameValue(new Function("return function() { return typeof anonymous; }")()(), "undefined");
|
||||
assert.sameValue(new Function("return function() { eval(''); return typeof anonymous; }")()(), "undefined");
|
||||
|
||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js, nativeFunctionMatcher.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Function.prototype.bind
|
||||
esid: pending
|
||||
---*/
|
||||
var gTestfile = 'function-bind.js';
|
||||
var BUGNUMBER = 429507;
|
||||
var summary = "ES5: Function.prototype.bind";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
// ad-hoc testing
|
||||
|
||||
@ -261,8 +252,3 @@ assertNativeFunction((function unbound(){"body"}).bind());
|
||||
/* 22. Return F. */
|
||||
var passim = function p(){}.bind(1);
|
||||
assert.sameValue(typeof passim, "function");
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
@ -8,17 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Function.prototype.call
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 575535;
|
||||
var summary = 'Function.prototype.call';
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
function expectTypeError(fun, msg)
|
||||
{
|
||||
@ -130,8 +122,3 @@ strictSome.call("foo", obj);
|
||||
|
||||
seenThis = obj;
|
||||
strictSome.call(obj, obj);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Function.prototype.caller should throw a TypeError for strict-mode functions
|
||||
esid: pending
|
||||
---*/
|
||||
var gTestfile = 'function-caller.js';
|
||||
var BUGNUMBER = 514581;
|
||||
var summary = "Function.prototype.caller should throw a TypeError for " +
|
||||
"strict-mode functions";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
// behavior
|
||||
|
||||
function expectTypeError(fun)
|
||||
{
|
||||
@ -44,7 +32,3 @@ expectTypeError(function barCaller() { bar.caller; });
|
||||
|
||||
function baz() { "use strict"; return 17; }
|
||||
expectTypeError(function bazCaller() { baz.caller; });
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
@ -8,23 +8,8 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Convert all arguments passed to Function() to string before doing any parsing of the to-be-created Function's parameters or body text
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 920479;
|
||||
var summary =
|
||||
"Convert all arguments passed to Function() to string before doing any " +
|
||||
"parsing of the to-be-created Function's parameters or body text";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
assertThrowsValue(() => Function("@", { toString() { throw 42; } }), 42);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Anonymous function name should be set based on assignment
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 883377;
|
||||
var summary = "Anonymous function name should be set based on assignment";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var fooSymbol = Symbol("foo");
|
||||
var emptySymbol = Symbol("");
|
||||
@ -145,4 +141,3 @@ function testLexicalBinding(expr, named) {
|
||||
for (var [expr, named] of exprs) {
|
||||
testLexicalBinding(expr, named);
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Anonymous function name should be set based on binding pattern
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 883377;
|
||||
var summary = "Anonymous function name should be set based on binding pattern";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var exprs = [
|
||||
["function() {}", false],
|
||||
@ -60,4 +56,3 @@ function testSingleNameBinding(expr, named) {
|
||||
for (var [expr, named] of exprs) {
|
||||
testSingleNameBinding(expr, named);
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Anonymous class with name method shouldn't be affected by assignment
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 883377;
|
||||
var summary = "Anonymous class with name method shouldn't be affected by assignment";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var classWithStaticNameMethod = class { static name() {} };
|
||||
assert.sameValue(typeof classWithStaticNameMethod.name, "function");
|
||||
@ -38,4 +34,3 @@ assert.sameValue(classWithNameGetter.name, "classWithNameGetter");
|
||||
|
||||
var classWithNameSetter = class { set name(v) {} };
|
||||
assert.sameValue(classWithNameSetter.name, "classWithNameSetter");
|
||||
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Anonymous function name should be set based on for-in initializer
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 883377;
|
||||
var summary = "Anonymous function name should be set based on for-in initializer";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var exprs = [
|
||||
["function() {}", false],
|
||||
@ -37,4 +33,3 @@ function testForInHead(expr, named) {
|
||||
for (var [expr, named] of exprs) {
|
||||
testForInHead(expr, named);
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Anonymous function name should be set based on method definition
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 883377;
|
||||
var summary = "Anonymous function name should be set based on method definition";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var fooSymbol = Symbol("foo");
|
||||
var emptySymbol = Symbol("");
|
||||
@ -76,4 +72,3 @@ testMethod("static *", "class");
|
||||
testMethod("static async", "class");
|
||||
testMethod("static get", "class");
|
||||
testMethod("static set", "class");
|
||||
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Anonymous function name should be set based on property name
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 883377;
|
||||
var summary = "Anonymous function name should be set based on property name";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var fooSymbol = Symbol("foo");
|
||||
var emptySymbol = Symbol("");
|
||||
@ -64,4 +60,3 @@ function testPropertyDefinition(expr, named) {
|
||||
for (var [expr, named] of exprs) {
|
||||
testPropertyDefinition(expr, named);
|
||||
}
|
||||
|
||||
|
@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Object.defineProperty sets arguments.length without setting the length-overridden bit
|
||||
esid: pending
|
||||
---*/
|
||||
var gTestfile = 'redefine-arguments-length.js';
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 539766;
|
||||
var summary =
|
||||
"Object.defineProperty sets arguments.length without setting the " +
|
||||
"length-overridden bit";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
function test_JSOP_ARGCNT()
|
||||
{
|
||||
@ -64,8 +52,3 @@ function test_array_toString_sub_2()
|
||||
assert.sameValue([].toLocaleString.call(arguments), "1");
|
||||
}
|
||||
test_array_toString_sub_2(1, 2);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Rest parameters to functions can be named |yield| or |eval| or |let| in non-strict code
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1288460;
|
||||
var summary =
|
||||
"Rest parameters to functions can be named |yield| or |eval| or |let| in "
|
||||
"non-strict code";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
var f1 = (...yield) => yield + 42;
|
||||
assert.sameValue(f1(), "42");
|
||||
@ -67,7 +56,3 @@ function h()
|
||||
}
|
||||
}
|
||||
h();
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Return value should not be overwritten by finally block with normal execution.
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 1202134;
|
||||
var summary = "Return value should not be overwritten by finally block with normal execution.";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// ==== single ====
|
||||
|
||||
@ -178,4 +174,3 @@ f = function() {
|
||||
}
|
||||
};
|
||||
assert.sameValue(f(), 42);
|
||||
|
||||
|
@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Returning non-object from @@iterator should throw
|
||||
esid: pending
|
||||
---*/
|
||||
var BUGNUMBER = 1021835;
|
||||
var summary = "Returning non-object from @@iterator should throw";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
let primitives = [
|
||||
1,
|
||||
@ -34,4 +30,3 @@ for (let primitive of primitives) {
|
||||
};
|
||||
assert.throws(TypeError, () => f(...arg));
|
||||
}
|
||||
|
||||
|
@ -8,16 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
ES5 strict mode: arguments objects of strict mode functions must copy argument values
|
||||
esid: pending
|
||||
---*/
|
||||
var gTestfile = 'strict-arguments.js';
|
||||
var BUGNUMBER = 516255;
|
||||
var summary =
|
||||
"ES5 strict mode: arguments objects of strict mode functions must copy " +
|
||||
"argument values";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
@ -451,8 +444,3 @@ assert.sameValue(arraysEqual(strictNestedAssignShadowFunctionName(), []), true);
|
||||
assert.sameValue(arraysEqual(strictNestedAssignShadowFunctionName(99), [99]), true);
|
||||
assert.sameValue(arraysEqual(strictNestedAssignShadowFunctionName(""), [""]), true);
|
||||
assert.sameValue(arraysEqual(strictNestedAssignShadowFunctionName(obj), [obj]), true);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("All tests passed!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user