Remove print calls in sm/Number

This commit is contained in:
André Bargull 2025-04-30 14:16:03 +02:00 committed by Philip Chimento
parent c92f4924fa
commit 1211b7805a
14 changed files with 14 additions and 182 deletions

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
'0x' not followed by hex digits should be a syntax error
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 582643;
var summary = "'0x' not followed by hex digits should be a syntax error";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
try
{
@ -31,7 +22,3 @@ catch (e)
assert.sameValue(e instanceof SyntaxError, true,
"bad exception thrown: " + e);
}
/******************************************************************************/
print("All tests passed!");

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.EPSILON
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 885798;
var summary = "ES6 (draft May 2013) 15.7.3.7 Number.EPSILON";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// Test value
assert.sameValue(Number.EPSILON, Math.pow(2, -52));
@ -29,4 +20,3 @@ var descriptor = Object.getOwnPropertyDescriptor(Number, 'EPSILON');
assert.sameValue(descriptor.writable, false);
assert.sameValue(descriptor.configurable, false);
assert.sameValue(descriptor.enumerable, false);

View File

@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.MIN_SAFE_INTEGER
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 885798;
var summary = "ES6 (draft April 2014) 20.1.2.10 Number.MIN_SAFE_INTEGER";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// Test value
assert.sameValue(Number.MIN_SAFE_INTEGER, -(Math.pow(2, 53) - 1));
@ -31,4 +21,3 @@ var descriptor = Object.getOwnPropertyDescriptor(Number, 'MIN_SAFE_INTEGER');
assert.sameValue(descriptor.writable, false);
assert.sameValue(descriptor.configurable, false);
assert.sameValue(descriptor.enumerable, false);

View File

@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.MAX_SAFE_INTEGER
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 885798;
var summary = "ES6 (draft April 2014) 20.1.2.6 Number.MAX_SAFE_INTEGER";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// Test value
assert.sameValue(Number.MAX_SAFE_INTEGER, Math.pow(2, 53) - 1);
@ -31,4 +21,3 @@ var descriptor = Object.getOwnPropertyDescriptor(Number, 'MAX_SAFE_INTEGER');
assert.sameValue(descriptor.writable, false);
assert.sameValue(descriptor.configurable, false);
assert.sameValue(descriptor.enumerable, false);

View File

@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.prototype.toExponential
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 818617;
var summary = "ECMAScript 2017 Draft ECMA-262 Section 20.1.3.2: Number.prototype.toExponential";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// With NaN, fractionDigits out of range.
assert.sameValue(Number.prototype.toExponential.call(NaN, 555), 'NaN');
@ -52,7 +42,3 @@ assertThrowsValue(
// Not a number throws TypeError
assert.throws(TypeError, () => Number.prototype.toExponential.call("Hello"));
if (typeof assert.sameValue === "function") {
}

View File

@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.prototype.toPrecision
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 818617;
var summary = "ECMAScript 2017 Draft ECMA-262 Section 20.1.3.5: Number.prototype.toPrecision";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// With NaN, fractionDigits out of range.
assert.sameValue(Number.prototype.toPrecision.call(NaN, 555), 'NaN');
@ -52,7 +42,3 @@ assertThrowsValue(
// Not a number throws TypeError
assert.throws(TypeError, () => Number.prototype.toPrecision.call("Hello"));
if (typeof assert.sameValue === "function") {
}

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.prototype.to* should throw a RangeError when passed a bad precision
esid: pending
---*/
var BUGNUMBER = 795745;
var summary =
"Number.prototype.to* should throw a RangeError when passed a bad precision";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
function test(method, prec)
{
@ -45,7 +36,3 @@ test("toFixed", 9999999);
test("toPrecision", 9999999);
test("toPrecision", 0);
/******************************************************************************/
print("Tests complete");

View File

@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
[[DefaultValue]] behavior wrong for Number with overridden valueOf/toString
esid: pending
---*/
var BUGNUMBER = 645464;
var summary =
"[[DefaultValue]] behavior wrong for Number with overridden valueOf/toString";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// equality
@ -169,7 +159,3 @@ function testInOperatorName()
assert.sameValue(n3 in { 0: 17 }, true);
}
testInOperatorName();
/******************************************************************************/
print("All tests passed!");

View File

@ -8,14 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.isSafeInteger(number)
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 1003764;
var summary = "ES6 (draft Draft May 22, 2014) ES6 20.1.2.5 Number.isSafeInteger(number)";
print(BUGNUMBER + ": " + summary);
assert.sameValue(Number.isSafeInteger.length, 1);
@ -42,6 +37,3 @@ assert.sameValue(Number.isSafeInteger(-Math.pow(2, 53) - 1), false);
assert.sameValue(Number.isSafeInteger(-Math.pow(2, 53)), false);
assert.sameValue(Number.isSafeInteger(-Math.pow(2, 53) + 1), true);
assert.sameValue(Number.isSafeInteger(-Math.pow(2, 53) + 2), true);
print("All tests passed!");

View File

@ -8,14 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.parseFloat(string)
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 886949;
var summary = "ES6 (draft May 2013) 15.7.3.10 Number.parseFloat(string)";
print(BUGNUMBER + ": " + summary);
assert.sameValue(Number.parseFloat("Infinity"), Infinity);
assert.sameValue(Number.parseFloat("+Infinity"), Infinity);
@ -30,5 +25,3 @@ assert.sameValue(Number.parseFloat("NaN"), NaN);
/* Number.parseFloat should be the same function object as global parseFloat. */
assert.sameValue(Number.parseFloat, parseFloat);
print("All tests passed!");

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.parseInt(string, radix)
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 886949;
var summary = "ES6 (draft May 2013) 15.7.3.9 Number.parseInt(string, radix)";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var str, radix;
var upvar;
@ -173,7 +164,3 @@ assert.sameValue(Number.parseInt("00A", 17), 10);
/* Number.parseInt should be the same function object as global parseInt. */
assert.sameValue(Number.parseInt, parseInt);
/******************************************************************************/
print("All tests passed!");

View File

@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.parseInt(string, radix). Verify that Number.parseInt defaults to decimal.
esid: pending
---*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 886949;
var summary = "ES6 (draft May 2013) 15.7.3.9 Number.parseInt(string, radix)." +
" Verify that Number.parseInt defaults to decimal.";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
assert.sameValue(Number.parseInt("08"), 8);
assert.sameValue(Number.parseInt("09"), 9);
@ -31,7 +21,3 @@ function strictParseInt(s) { "use strict"; return Number.parseInt(s); }
assert.sameValue(strictParseInt("08"), 8);
assert.sameValue(strictParseInt("09"), 9);
assert.sameValue(strictParseInt("014"), 14);
/******************************************************************************/
print("All tests passed!");

View File

@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Number.prototype.toString should use ToInteger on the radix and should throw a RangeError if the radix is bad
esid: pending
---*/
var BUGNUMBER = 647385;
var summary =
"Number.prototype.toString should use ToInteger on the radix and should " +
"throw a RangeError if the radix is bad";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
function test(r)
{
@ -36,7 +26,3 @@ function test(r)
}
test(Math.pow(2, 32) + 10);
test(55);
/******************************************************************************/
print("All tests passed!");

View File

@ -8,17 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags:
- noStrict
description: |
pending
Various tests of ToNumber(string), particularly +"0x" being NaN
esid: pending
---*/
var BUGNUMBER = 872853;
var summary = 'Various tests of ToNumber(string), particularly +"0x" being NaN';
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
assert.sameValue(+"0x", NaN);
assert.sameValue(+"\t0x", NaN);
@ -37,7 +29,3 @@ assert.sameValue(+"\t+Infinity", Infinity);
assert.sameValue(+"-Infinity\n", -Infinity);
assert.sameValue(+"+ Infinity", NaN);
assert.sameValue(+"- Infinity", NaN);
/******************************************************************************/
print("Tests complete");