Remove remaining print calls in staging/sm

This commit is contained in:
André Bargull 2025-04-30 14:16:07 +02:00 committed by Philip Chimento
parent ea18b9dce5
commit 0943f84f31
31 changed files with 35 additions and 283 deletions

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
CloneArrayBuffer should be called with byteLength of source typedArray
esid: pending
---*/
var BUGNUMBER = 1264941;
var summary = 'CloneArrayBuffer should be called with byteLength of source typedArray';
print(BUGNUMBER + ": " + summary);
function test(ctor, byteLength) {
var abuf = new ctor(byteLength);
@ -41,4 +37,3 @@ test(ArrayBuffer, 128);
class MyArrayBuffer extends ArrayBuffer {}
test(MyArrayBuffer, 16);
test(MyArrayBuffer, 128);

View File

@ -6,14 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
ArrayBuffer getters should have get prefix
esid: pending
---*/
var BUGNUMBER = 1180290;
var summary = 'ArrayBuffer getters should have get prefix';
print(BUGNUMBER + ": " + summary);
assert.sameValue(Object.getOwnPropertyDescriptor(ArrayBuffer, Symbol.species).get.name, "get [Symbol.species]");
assert.sameValue(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get.name, "get byteLength");

View File

@ -6,15 +6,10 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
DataView getters should have get prefix
esid: pending
---*/
var BUGNUMBER = 1180290;
var summary = 'DataView getters should have get prefix';
print(BUGNUMBER + ": " + summary);
assert.sameValue(Object.getOwnPropertyDescriptor(DataView.prototype, "buffer").get.name, "get buffer");
assert.sameValue(Object.getOwnPropertyDescriptor(DataView.prototype, "byteLength").get.name, "get byteLength");
assert.sameValue(Object.getOwnPropertyDescriptor(DataView.prototype, "byteOffset").get.name, "get byteOffset");

View File

@ -8,26 +8,10 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Reconfiguring the first expando property added to an Error object shouldn't assert
esid: pending
---*/
var gTestfile = "error-expando-reconfigure.js"
//-----------------------------------------------------------------------------
var BUGNUMBER = 961494;
var summary =
"Reconfiguring the first expando property added to an Error object " +
"shouldn't assert";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var err = new Error(); // no message argument => no err.message property
err.expando = 17;
Object.defineProperty(err, "expando", { configurable: false });
/******************************************************************************/
print("Tests complete");

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
All NaNs must be treated as identical keys for Map
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 722260;
var summary = 'All NaNs must be treated as identical keys for Map';
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
/* Avoid constant-folding that would happen were |undefined| to be used. */
var key = -/a/g.missingProperty;
@ -54,7 +45,3 @@ m.delete(key);
assert.sameValue(m.has(key), false);
assert.sameValue(m.has(-key), false);
assert.sameValue(m.has(NaN), false);
/******************************************************************************/
print("Tests complete");

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Map/Set/WeakMap/WeakSet constructor should close iterator on error
esid: pending
---*/
var BUGNUMBER = 1180306;
var summary = 'Map/Set/WeakMap/WeakSet constructor should close iterator on error';
print(BUGNUMBER + ": " + summary);
function test(ctors, { nextVal=undefined,
nextThrowVal=undefined,
@ -299,4 +295,3 @@ test([Set, WeakSet], {
nextVal: { value: {}, done: false },
closed: false,
});

View File

@ -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 ctors = [
Map,
@ -40,4 +36,3 @@ for (let ctor of ctors) {
assert.throws(TypeError, () => new ctor(arg));
}
}

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Don't use .call(...) in the self-hosted Map.prototype.forEach
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 987243;
var summary = "Don't use .call(...) in the self-hosted Map.prototype.forEach";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var functionCall = Function.prototype.call;
@ -50,7 +41,3 @@ new Map([[1, 2]]).forEach(lalala);
new Map([[1, 2], [3, 4]]).forEach(lalala);
assert.sameValue(callCount, 0);
/******************************************************************************/
print("Tests complete");

View File

@ -6,14 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Map getters should have get prefix
esid: pending
---*/
var BUGNUMBER = 1180290;
var summary = 'Map getters should have get prefix';
print(BUGNUMBER + ": " + summary);
assert.sameValue(Object.getOwnPropertyDescriptor(Map, Symbol.species).get.name, "get [Symbol.species]");
assert.sameValue(Object.getOwnPropertyDescriptor(Map.prototype, "size").get.name, "get size");

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js, sm/non262-Math-shell.js]
flags:
- noStrict
description: |
pending
expm1 should be monotonically increasing
esid: pending
---*/
var BUGNUMBER = 897634;
var summary = "expm1 should be monotonically increasing";
print(BUGNUMBER + ": " + summary);
function test(x, prev, next) {
assert.sameValue(Math.expm1(prev) <= Math.expm1(x), true);
@ -100,4 +96,3 @@ test(10000000000, 9999999999.999998, 10000000000.000002);
test(1e+100, 9.999999999999998e+99, 1.0000000000000002e+100);
test(1e+223, 9.999999999999999e+222, 1.0000000000000002e+223);
test(1.7976931348623157e+308, 1.7976931348623155e+308, Infinity);

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js, deepEqual.js]
flags:
- noStrict
description: |
pending
Implement @@species getter for builtin types
esid: pending
---*/
var BUGNUMBER = 1131043;
var summary = "Implement @@species getter for builtin types";
print(BUGNUMBER + ": " + summary);
var TypedArray = Object.getPrototypeOf(Int8Array);
@ -36,4 +32,3 @@ for (C of [Array, Map, Set, RegExp,
assert.sameValue(desc.get.apply(undefined), undefined);
assert.sameValue(desc.get.apply(42), 42);
}

View File

@ -22,4 +22,3 @@ assert.throws(TypeError, () => ol.testNonExistent());
var olElem = { testNonExistent() { var prop = "prop"; super[prop](); } };
assert.throws(TypeError, () => olElem.testNonExistent());

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Function in computed property in class expression in array destructuring default
esid: pending
---*/
var BUGNUMBER = 1322314;
var summary = "Function in computed property in class expression in array destructuring default";
print(BUGNUMBER + ": " + summary);
function* g([
a = class E {
@ -31,4 +27,3 @@ assert.sameValue(x.foo(), 10);
C = [...g([undefined])][0];
x = new C();
assert.sameValue(x.foo(), 10);

View File

@ -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,
@ -42,4 +38,3 @@ for (let primitive of primitives) {
f(obj);
});
}

View File

@ -6,20 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Destructuring should evaluate lhs reference before rhs in super property
esid: pending
---*/
var BUGNUMBER = 1204028;
var summary = "Destructuring should evaluate lhs reference before rhs in super property";
if (typeof assert.sameValue === "undefined") {
assert.sameValue = function(a, b) {
if (a !== b)
throw new Error(`expected ${b}, got ${a}\n${new Error().stack}`);
};
}
print(BUGNUMBER + ": " + summary);
let logs = [];
function log(x) {
@ -707,4 +696,3 @@ class C2 extends C1 {
}
new C2();

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Destructuring should evaluate lhs reference before rhs
esid: pending
---*/
var BUGNUMBER = 1204028;
var summary = "Destructuring should evaluate lhs reference before rhs";
print(BUGNUMBER + ": " + summary);
let storage = {
clear() {
@ -725,4 +721,3 @@ assert.sameValue(storage.values.v, "V");
assert.sameValue(storage.values.x, "X");
assert.sameValue(storage.values.z, "Z");
assert.sameValue(storage.values.length, 2);

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
IteratorNext should throw if the value returned by iterator.next() is not an object.
esid: pending
---*/
var BUGNUMBER = 1016936;
var summary = "IteratorNext should throw if the value returned by iterator.next() is not an object.";
print(BUGNUMBER + ": " + summary);
var nonobjs = [
null,
@ -69,4 +65,3 @@ for (var nonobj of nonobjs) {
v.next();
});
}

View File

@ -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 ====
@ -315,4 +311,3 @@ assert.sameValue(v.done, false);
v = g.return(44);
assert.sameValue(v.value, 44);
assert.sameValue(v.done, true);

View File

@ -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,
@ -37,4 +33,3 @@ for (let primitive of primitives) {
}
});
}

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Don't crash compiling a non-body-level for-loop whose loop declaration is a const
esid: pending
---*/
var gTestfile = "const-declaration-in-for-loop.js";
//-----------------------------------------------------------------------------
var BUGNUMBER = 1146644;
var summary =
"Don't crash compiling a non-body-level for-loop whose loop declaration is " +
"a const";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// Don't attempt execution as a script if we can't properly emulate it. We
// could perhaps use eval, but eval, while also doing global execution, is its
@ -87,7 +75,3 @@ Function(`if (true)
for (const a12 in {})
continue;
}`)();
/******************************************************************************/
print("Tests complete");

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Eval always has a lexical environment
esid: pending
---*/
var gTestfile = "eval-has-lexical-environment.js"
//-----------------------------------------------------------------------------
var BUGNUMBER = 1193583;
var summary =
"Eval always has a lexical environment";
/**************
* BEGIN TEST *
**************/
eval(`
let foo = 42;
@ -46,5 +37,3 @@ assert.sameValue(f(), 84);
// Var can escape direct eval.
assert.sameValue(bar, 84);
print("Tests complete");

View File

@ -8,22 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Don't assert when freshening the scope chain for a for-loop whose head contains a lexical declaration, where the loop body might add more bindings at runtime
esid: pending
---*/
var gTestfile = "for-loop-with-bindings-added-at-runtime.js";
//-----------------------------------------------------------------------------
var BUGNUMBER = 1149797;
var summary =
"Don't assert when freshening the scope chain for a for-loop whose head " +
"contains a lexical declaration, where the loop body might add more " +
"bindings at runtime";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
for (let x = 0; x < 9; ++x)
eval("var y");
@ -124,7 +111,3 @@ function h2()
}
}
h2();
/******************************************************************************/
print("Tests complete");

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
for-loop semantics for for(;;) loops whose heads contain lexical declarations
esid: pending
---*/
var gTestfile = "for-loop.js";
//-----------------------------------------------------------------------------
var BUGNUMBER = 985733;
var summary =
"ES6 for-loop semantics for for(;;) loops whose heads contain lexical "
"declarations";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
function isError(code, type)
{
@ -120,7 +108,3 @@ if (save() !== "OUTER V IGNORE")
t(8, "body", 8);
assert.sameValue(funcs.length, 9);
}
/******************************************************************************/
print("Tests complete");

View File

@ -11,6 +11,7 @@ description: |
pending
esid: pending
---*/
let v = "global-v";
function f(v, global)
@ -21,5 +22,3 @@ function f(v, global)
assert.sameValue(f("argument-v", this), "argument-v",
"let-var shouldn't appear in global for |with| purposes");
print("Tests complete");

View File

@ -8,22 +8,14 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Valgrind errors in jsemit.cpp
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 410852;
var summary = 'Valgrind errors in jsemit.cpp';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
print('Note: You must run this test under valgrind to determine if it passes');
try
{
eval('function(){if(t)');

View File

@ -8,19 +8,14 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Do not assert: JSSTRING_IS_FLAT(str_)
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 449666;
var summary = 'Do not assert: JSSTRING_IS_FLAT(str_)';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
@ -51,7 +46,6 @@ function test()
d=d[c[e]];
}
d[c[c.length-1]]=b;
print("hi");
}
function T(a){return "hmm"}
@ -61,5 +55,5 @@ function test()
}
assert.sameValue(expect, actual, summary);
assert.sameValue(expect, actual);
}

View File

@ -8,25 +8,20 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Promote evald initializer into upvar
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 470758;
var summary = 'Promote evald initializer into upvar';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
expect = 5;
(function(){var x;eval("for (x = 0; x < 5; x++);");print(actual = x);})();
(function(){var x;eval("for (x = 0; x < 5; x++);"); actual = x;})();
assert.sameValue(expect, actual, summary);
assert.sameValue(expect, actual);
}

View File

@ -11,13 +11,13 @@ description: |
pending
esid: pending
---*/
var expect, actual;
var obj = {
f: function() {
expect = this.g;
actual = arguments.callee.caller;
print("Ok");
}
};

View File

@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-strict-shell.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Assigning to a function expression's name within that function should throw a TypeError in strict mode code
esid: pending
---*/
var gTestfile = 'assign-to-callee-name.js';
var BUGNUMBER = 610350;
var summary =
"Assigning to a function expression's name within that function should " +
"throw a TypeError in strict mode code";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var f = function assignSelfStrict() { "use strict"; assignSelfStrict = 12; };
@ -41,7 +30,3 @@ var f2 = function assignSelf() { assignSelf = 12; };
f2(); // shouldn't throw, does nothing
assert.sameValue(assignSelf, 42);
/******************************************************************************/
print("All tests passed!");

View File

@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-strict-shell.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
A string literal containing an octal escape before a strict mode directive should be a syntax error
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 601262;
var summary =
"A string literal containing an octal escape before a strict mode " +
"directive should be a syntax error";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
try
{
@ -79,7 +68,3 @@ function notAnError3()
"\145";
function g() { "use strict"; }
}
/******************************************************************************/
print("All tests passed!");

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-strict-shell.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
JSOP_CALLEE should push undefined, not null, for this
esid: pending
---*/
var gTestfile = 'this-for-function-expression-recursion.js';
var BUGNUMBER = 611276;
var summary = "JSOP_CALLEE should push undefined, not null, for this";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// Calling a named function expression (not function statement) uses the
// JSOP_CALLEE opcode. This opcode pushes its own |this|, distinct from the
@ -43,7 +34,3 @@ var calleeThisStrictFun =
return calleeThisStrictFun(true);
};
assert.sameValue(calleeThisStrictFun(false), undefined);
/******************************************************************************/
print("All tests passed!");