mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 16:04:36 +02:00
built-ins/Number/*: make all indentation consistent (depth & character) (#1436)
This commit is contained in:
parent
4fd36e7f1d
commit
9a211b1c9f
@ -8,6 +8,6 @@ description: >
|
|||||||
object (using getPrototypeOf)
|
object (using getPrototypeOf)
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var p = Object.getPrototypeOf(Number);
|
var p = Object.getPrototypeOf(Number);
|
||||||
|
|
||||||
assert.sameValue(p, Function.prototype, 'p');
|
assert.sameValue(p, Function.prototype, 'p');
|
||||||
|
@ -6,7 +6,7 @@ es5id: 15.7.4-1
|
|||||||
description: "Number prototype object: its [[Class]] must be 'Number'"
|
description: "Number prototype object: its [[Class]] must be 'Number'"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var numProto = Object.getPrototypeOf(new Number(42));
|
var numProto = Object.getPrototypeOf(new Number(42));
|
||||||
var s = Object.prototype.toString.call(numProto );
|
var s = Object.prototype.toString.call(numProto);
|
||||||
|
|
||||||
assert.sameValue(s, '[object Number]', 's');
|
assert.sameValue(s, '[object Number]', 's');
|
||||||
|
@ -8,8 +8,8 @@ description: Checking if enumerating Number.MAX_VALUE fails
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
for(var x in Number) {
|
for (var x in Number) {
|
||||||
if(x === "MAX_VALUE") {
|
if (x === "MAX_VALUE") {
|
||||||
$ERROR('#1: Number.MAX_VALUE has the attribute DontEnum');
|
$ERROR('#1: Number.MAX_VALUE has the attribute DontEnum');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ description: Checking if enumerating Number.MIN_VALUE fails
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
for(var x in Number) {
|
for (var x in Number) {
|
||||||
if(x === "MIN_VALUE") {
|
if (x === "MIN_VALUE") {
|
||||||
$ERROR('#1: Number.MIN_VALUE has the attribute DontEnum');
|
$ERROR('#1: Number.MIN_VALUE has the attribute DontEnum');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,23 +10,23 @@ description: Used values "10", 10, new String("10"), new Object(10) and "abc"
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if( typeof Number("10") !== "number" ) {
|
if (typeof Number("10") !== "number") {
|
||||||
$ERROR('#1: typeof Number("10") should be "number", actual is "'+typeof Number("10")+'"');
|
$ERROR('#1: typeof Number("10") should be "number", actual is "' + typeof Number("10") + '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if( typeof Number(10) !== "number" ) {
|
if (typeof Number(10) !== "number") {
|
||||||
$ERROR('#2: typeof Number(10) should be "number", actual is "'+typeof Number(10)+'"');
|
$ERROR('#2: typeof Number(10) should be "number", actual is "' + typeof Number(10) + '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if( typeof Number(new String("10")) !== "number" ) {
|
if (typeof Number(new String("10")) !== "number") {
|
||||||
$ERROR('#3: typeof Number(new String("10")) should be "number", actual is "'+typeof Number(new String("10"))+'"');
|
$ERROR('#3: typeof Number(new String("10")) should be "number", actual is "' + typeof Number(new String("10")) + '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if( typeof Number(new Object(10)) !== "number" ) {
|
if (typeof Number(new Object(10)) !== "number") {
|
||||||
$ERROR('#4: typeof Number(new Object(10)) should be "number", actual is "'+typeof Number(new Object(10))+'"');
|
$ERROR('#4: typeof Number(new Object(10)) should be "number", actual is "' + typeof Number(new Object(10)) + '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK #5
|
//CHECK #5
|
||||||
|
@ -8,13 +8,13 @@ description: Call Number() and check result
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if( typeof Number() !== "number" ) {
|
if (typeof Number() !== "number") {
|
||||||
$ERROR('#1: typeof Number() should be "number", actual is "'+typeof Number()+'"');
|
$ERROR('#1: typeof Number() should be "number", actual is "' + typeof Number() + '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if( Number() !== 0 ) {
|
if (Number() !== 0) {
|
||||||
$ERROR('#2: Number() === 0, actual is '+Number());
|
$ERROR('#2: Number() === 0, actual is ' + Number());
|
||||||
} else if( 1/Number() !== Number.POSITIVE_INFINITY ) {
|
} else if (1 / Number() !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#2: Number() === +0, actual is '+Number());
|
$ERROR('#2: Number() === +0, actual is ' + Number());
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,13 @@ if (new Number() === undefined) {
|
|||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
var x3 = new Number();
|
var x3 = new Number();
|
||||||
if(typeof x3 !== "object"){
|
if (typeof x3 !== "object") {
|
||||||
$ERROR("#3: typeof new Number() === 'object'");
|
$ERROR("#3: typeof new Number() === 'object'");
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
var x4 = new Number();
|
var x4 = new Number();
|
||||||
if(x4 === undefined){
|
if (x4 === undefined) {
|
||||||
$ERROR("#4: new Number() should not be undefined");
|
$ERROR("#4: new Number() should not be undefined");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,12 +43,12 @@ if (new Number(10) === undefined) {
|
|||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
var x7 = new Number(10);
|
var x7 = new Number(10);
|
||||||
if(typeof x7 !== "object"){
|
if (typeof x7 !== "object") {
|
||||||
$ERROR("#7: typeof new Number(10) === 'object'");
|
$ERROR("#7: typeof new Number(10) === 'object'");
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
var x8 = new Number(10);
|
var x8 = new Number(10);
|
||||||
if(x8 === undefined){
|
if (x8 === undefined) {
|
||||||
$ERROR("#8: new Number(10) should not be undefined");
|
$ERROR("#8: new Number(10) should not be undefined");
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,6 @@ if (x1.valueOf() !== 1) {
|
|||||||
var x2 = new Number();
|
var x2 = new Number();
|
||||||
if (x2.valueOf() !== 0) {
|
if (x2.valueOf() !== 0) {
|
||||||
$ERROR('#2.1: var x2 = new Number(); x2.valueOf() === 0');
|
$ERROR('#2.1: var x2 = new Number(); x2.valueOf() === 0');
|
||||||
} else if( 1/x2.valueOf() !== Number.POSITIVE_INFINITY ) {
|
} else if (1 / x2.valueOf() !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#2.2: var x2 = new Number(); x2.valueOf() === +0');
|
$ERROR('#2.2: var x2 = new Number(); x2.valueOf() === +0');
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,6 @@ es5id: 15.7.3_A1
|
|||||||
description: Checking existence of the property "prototype"
|
description: Checking existence of the property "prototype"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
if(!Number.hasOwnProperty("prototype")){
|
if (!Number.hasOwnProperty("prototype")) {
|
||||||
$ERROR('#1: The Number constructor has the property "prototype"');
|
$ERROR('#1: The Number constructor has the property "prototype"');
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,6 @@ es5id: 15.7.3_A2
|
|||||||
description: Checking existence of the property "MAX_VALUE"
|
description: Checking existence of the property "MAX_VALUE"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
if(!Number.hasOwnProperty("MAX_VALUE")){
|
if (!Number.hasOwnProperty("MAX_VALUE")) {
|
||||||
$ERROR('#1: The Number constructor has the property "MAX_VALUE"');
|
$ERROR('#1: The Number constructor has the property "MAX_VALUE"');
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,6 @@ es5id: 15.7.3_A3
|
|||||||
description: Checking existence of the property "MIN_VALUE"
|
description: Checking existence of the property "MIN_VALUE"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
if(!Number.hasOwnProperty("MIN_VALUE")){
|
if (!Number.hasOwnProperty("MIN_VALUE")) {
|
||||||
$ERROR('#1: The Number constructor has the property "MIN_VALUE"');
|
$ERROR('#1: The Number constructor has the property "MIN_VALUE"');
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,6 @@ es5id: 15.7.3_A4
|
|||||||
description: Checking existence of the property "NaN"
|
description: Checking existence of the property "NaN"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
if(!Number.hasOwnProperty("NaN")){
|
if (!Number.hasOwnProperty("NaN")) {
|
||||||
$ERROR('#1: The Number constructor has the property "NaN"');
|
$ERROR('#1: The Number constructor has the property "NaN"');
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,6 @@ es5id: 15.7.3_A5
|
|||||||
description: Checking existence of the property "NEGATIVE_INFINITY"
|
description: Checking existence of the property "NEGATIVE_INFINITY"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
if(!Number.hasOwnProperty("NEGATIVE_INFINITY")){
|
if (!Number.hasOwnProperty("NEGATIVE_INFINITY")) {
|
||||||
$ERROR('#1: The Number constructor has the property "NEGATIVE_INFINITY"');
|
$ERROR('#1: The Number constructor has the property "NEGATIVE_INFINITY"');
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,6 @@ es5id: 15.7.3_A6
|
|||||||
description: Checking existence of the property "POSITIVE_INFINITY"
|
description: Checking existence of the property "POSITIVE_INFINITY"
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
if(!Number.hasOwnProperty("POSITIVE_INFINITY")){
|
if (!Number.hasOwnProperty("POSITIVE_INFINITY")) {
|
||||||
$ERROR('#1: The Number constructor has the property "POSITIVE_INFINITY"');
|
$ERROR('#1: The Number constructor has the property "POSITIVE_INFINITY"');
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ description: Checking Number.length property
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (!Number.hasOwnProperty("length")){
|
if (!Number.hasOwnProperty("length")) {
|
||||||
$ERROR('#1: Number constructor has length property');
|
$ERROR('#1: Number constructor has length property');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ description: Checking property constructor
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number()).hasOwnProperty("constructor") !== false){
|
if ((new Number()).hasOwnProperty("constructor") !== false) {
|
||||||
$ERROR('#1: Number instance must have no special property "constructor"');
|
$ERROR('#1: Number instance must have no special property "constructor"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).constructor !== Number.prototype.constructor){
|
if ((new Number()).constructor !== Number.prototype.constructor) {
|
||||||
$ERROR('#2: Number instance property "constructor" must be inherited from Number prototype object');
|
$ERROR('#2: Number instance property "constructor" must be inherited from Number prototype object');
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ description: Checking property toString
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number()).hasOwnProperty("toString") !== false){
|
if ((new Number()).hasOwnProperty("toString") !== false) {
|
||||||
$ERROR('#1: Number instance must have no special property "toString"');
|
$ERROR('#1: Number instance must have no special property "toString"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString !== Number.prototype.toString){
|
if ((new Number()).toString !== Number.prototype.toString) {
|
||||||
$ERROR('#2: Number instance property "toString" must be inherited from Number prototype object');
|
$ERROR('#2: Number instance property "toString" must be inherited from Number prototype object');
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ description: Checking property toLocaleString
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number()).hasOwnProperty("toLocaleString") !== false){
|
if ((new Number()).hasOwnProperty("toLocaleString") !== false) {
|
||||||
$ERROR('#1: Number instance must have no special property "toLocaleString"');
|
$ERROR('#1: Number instance must have no special property "toLocaleString"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toLocaleString !== Number.prototype.toLocaleString){
|
if ((new Number()).toLocaleString !== Number.prototype.toLocaleString) {
|
||||||
$ERROR('#2: Number instance property "toLocaleString" must be inherited from Number prototype object');
|
$ERROR('#2: Number instance property "toLocaleString" must be inherited from Number prototype object');
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ description: Checking property valueOf
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number()).hasOwnProperty("valueOf") !== false){
|
if ((new Number()).hasOwnProperty("valueOf") !== false) {
|
||||||
$ERROR('#1: Number instance must have no special property "valueOf"');
|
$ERROR('#1: Number instance must have no special property "valueOf"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).valueOf !== Number.prototype.valueOf){
|
if ((new Number()).valueOf !== Number.prototype.valueOf) {
|
||||||
$ERROR('#2: Number instance property "valueOf" must be inherited from Number prototype object');
|
$ERROR('#2: Number instance property "valueOf" must be inherited from Number prototype object');
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ description: Checking property toFixed
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number()).hasOwnProperty("toFixed") !== false){
|
if ((new Number()).hasOwnProperty("toFixed") !== false) {
|
||||||
$ERROR('#1: Number instance must have no special property "toFixed"');
|
$ERROR('#1: Number instance must have no special property "toFixed"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toFixed !== Number.prototype.toFixed){
|
if ((new Number()).toFixed !== Number.prototype.toFixed) {
|
||||||
$ERROR('#2: Number instance property "toFixed" must be inherited from Number prototype object');
|
$ERROR('#2: Number instance property "toFixed" must be inherited from Number prototype object');
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ description: Checking property toExponential
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number()).hasOwnProperty("toExponential") !== false){
|
if ((new Number()).hasOwnProperty("toExponential") !== false) {
|
||||||
$ERROR('#1: Number instance must have no special property "toExponential"');
|
$ERROR('#1: Number instance must have no special property "toExponential"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toExponential !== Number.prototype.toExponential){
|
if ((new Number()).toExponential !== Number.prototype.toExponential) {
|
||||||
$ERROR('#2: Number instance property "toExponential" must be inherited from Number prototype object');
|
$ERROR('#2: Number instance property "toExponential" must be inherited from Number prototype object');
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ description: Checking property toPrecision
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number()).hasOwnProperty("toPrecision") !== false){
|
if ((new Number()).hasOwnProperty("toPrecision") !== false) {
|
||||||
$ERROR('#1: Number instance must have no special property "toPrecision"');
|
$ERROR('#1: Number instance must have no special property "toPrecision"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toPrecision !== Number.prototype.toPrecision){
|
if ((new Number()).toPrecision !== Number.prototype.toPrecision) {
|
||||||
$ERROR('#2: Number instance property "toPrecision" must be inherited from Number prototype object');
|
$ERROR('#2: Number instance property "toPrecision" must be inherited from Number prototype object');
|
||||||
}
|
}
|
||||||
|
@ -13,12 +13,19 @@ description: >
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var __obj = {toString: function() {return "1"}, valueOf: function() {return new Object();}}
|
var __obj = {
|
||||||
|
toString: function() {
|
||||||
|
return "1"
|
||||||
|
},
|
||||||
|
valueOf: function() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (Number(__obj) !== 1) {
|
if (Number(__obj) !== 1) {
|
||||||
$ERROR('#1.1: var __obj = {toNumber: function() {return "1"}, valueOf: function() {return new Object();}}; Number(__obj) === 1. Actual: ' + (Number(__obj)));
|
$ERROR('#1.1: var __obj = {toNumber: function() {return "1"}, valueOf: function() {return new Object();}}; Number(__obj) === 1. Actual: ' + (Number(__obj)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(e)
|
catch (e)
|
||||||
{
|
{
|
||||||
$ERROR('#1.2: var __obj = {toNumber: function() {return "1"}, valueOf: function() {return new Object();}}; Number(__obj) === 1. Actual: ' + (e));
|
$ERROR('#1.2: var __obj = {toNumber: function() {return "1"}, valueOf: function() {return new Object();}}; Number(__obj) === 1. Actual: ' + (e));
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,18 @@ description: >
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var __obj = {valueOf:function(){return new Object;},toString: function() {return new Object();}}
|
var __obj = {
|
||||||
|
valueOf: function() {
|
||||||
|
return new Object;
|
||||||
|
},
|
||||||
|
toString: function() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
}
|
||||||
Number(__obj);
|
Number(__obj);
|
||||||
$ERROR('#1.1: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (Number(__obj)));
|
$ERROR('#1.1: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (Number(__obj)));
|
||||||
}
|
}
|
||||||
catch(e)
|
catch (e)
|
||||||
{
|
{
|
||||||
if ((e instanceof TypeError) !== true) {
|
if ((e instanceof TypeError) !== true) {
|
||||||
$ERROR('#1.2: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (e));
|
$ERROR('#1.2: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (e));
|
||||||
|
@ -12,13 +12,27 @@ description: >
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
var object = {valueOf: function() {return "1"}, toString: function() {return 0}};
|
var object = {
|
||||||
|
valueOf: function() {
|
||||||
|
return "1"
|
||||||
|
},
|
||||||
|
toString: function() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
};
|
||||||
if (Number(object) !== 1) {
|
if (Number(object) !== 1) {
|
||||||
$ERROR('#1: var object = {valueOf: function() {return "1"}, toString: function() {return 0}}; Number(object) === 1. Actual: ' + (Number(object)));
|
$ERROR('#1: var object = {valueOf: function() {return "1"}, toString: function() {return 0}}; Number(object) === 1. Actual: ' + (Number(object)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
var object = {valueOf: function() {return {}}, toString: function() {return "0"}};
|
var object = {
|
||||||
|
valueOf: function() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
toString: function() {
|
||||||
|
return "0"
|
||||||
|
}
|
||||||
|
};
|
||||||
if (Number(object) !== 0) {
|
if (Number(object) !== 0) {
|
||||||
$ERROR('#2: var object = {valueOf: function() {return {}}, toString: function() {return "0"}}; Number(object) === 0. Actual: ' + (Number(object)));
|
$ERROR('#2: var object = {valueOf: function() {return {}}, toString: function() {return "0"}}; Number(object) === 0. Actual: ' + (Number(object)));
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ description: Number('') convert to Number by explicit transformation
|
|||||||
if (Number("") !== 0) {
|
if (Number("") !== 0) {
|
||||||
$ERROR('#1.1: Number("") === 0. Actual: ' + (Number("")));
|
$ERROR('#1.1: Number("") === 0. Actual: ' + (Number("")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#1.2: Number("") == +0. Actual: -0');
|
$ERROR('#1.2: Number("") == +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@ description: Compare Number('.12345') with +('12345')*1e-5
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
if (Number(".12345") !== +("12345")*1e-5) {
|
if (Number(".12345") !== +("12345") * 1e-5) {
|
||||||
$ERROR('#1: Number(".12345") === +("12345")*1e-5');
|
$ERROR('#1: Number(".12345") === +("12345")*1e-5');
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,11 @@ description: >
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
if (Number(".12345e6") !== +("12345")*1e1) {
|
if (Number(".12345e6") !== +("12345") * 1e1) {
|
||||||
$ERROR('#1: Number(".12345e6") === +("12345")*1e1');
|
$ERROR('#1: Number(".12345e6") === +("12345")*1e1');
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (Number(".12345e-3") !== Number("12345")*1e-8) {
|
if (Number(".12345e-3") !== Number("12345") * 1e-8) {
|
||||||
$ERROR('#2: Number(".12345e-3") === Number("12345")*1e-8');
|
$ERROR('#2: Number(".12345e-3") === Number("12345")*1e-8');
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,11 @@ description: >
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
if (Number("12345e6") !== +("12345")*1e6) {
|
if (Number("12345e6") !== +("12345") * 1e6) {
|
||||||
$ERROR('#1: Number("12345e6") === +("12345")*1e6');
|
$ERROR('#1: Number("12345e6") === +("12345")*1e6');
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (Number("12345e-6") !== Number("12345")*1e-6) {
|
if (Number("12345e-6") !== Number("12345") * 1e-6) {
|
||||||
$ERROR('#2: Number("12345e-6") === Number("12345")*1e-6');
|
$ERROR('#2: Number("12345e-6") === Number("12345")*1e-6');
|
||||||
}
|
}
|
||||||
|
@ -10,16 +10,16 @@ description: Compare '12' with Number("1")*10+Number("2") and analogous
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
if (+("12") !== Number("1")*10+Number("2")) {
|
if (+("12") !== Number("1") * 10 + Number("2")) {
|
||||||
$ERROR('#1: +("12") === Number("1")*10+Number("2")');
|
$ERROR('#1: +("12") === Number("1")*10+Number("2")');
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (Number("123") !== Number("12")*10+Number("3")) {
|
if (Number("123") !== Number("12") * 10 + Number("3")) {
|
||||||
$ERROR('#2: Number("123") === Number("12")*10+Number("3")');
|
$ERROR('#2: Number("123") === Number("12")*10+Number("3")');
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (Number("1234") !== Number("123")*10+Number("4")) {
|
if (Number("1234") !== Number("123") * 10 + Number("4")) {
|
||||||
$ERROR('#2: Number("1234") === Number("123")*10+Number("4")');
|
$ERROR('#2: Number("1234") === Number("123")*10+Number("4")');
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ description: >
|
|||||||
if (Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000") !== 0) {
|
if (Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000") !== 0) {
|
||||||
$ERROR('#1.1: Number("\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000") === 0. Actual: ' + (Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000")));
|
$ERROR('#1.1: Number("\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000") === 0. Actual: ' + (Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#1.2: Number("\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000") === +0. Actual: -0');
|
$ERROR('#1.2: Number("\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@ if (Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u
|
|||||||
if (Number(" ") !== 0) {
|
if (Number(" ") !== 0) {
|
||||||
$ERROR('#2.1: Number(" ") === 0. Actual: ' + (Number(" ")));
|
$ERROR('#2.1: Number(" ") === 0. Actual: ' + (Number(" ")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(" ") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number(" ") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#2.2: Number(" ") === +0. Actual: -0');
|
$ERROR('#2.2: Number(" ") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ if (Number(" ") !== 0) {
|
|||||||
if (Number("\t") !== 0) {
|
if (Number("\t") !== 0) {
|
||||||
$ERROR('#3.1: Number("\\t") === 0. Actual: ' + (Number("\t")));
|
$ERROR('#3.1: Number("\\t") === 0. Actual: ' + (Number("\t")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\t") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\t") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#3.2: Number("\\t") === +0. Actual: -0');
|
$ERROR('#3.2: Number("\\t") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@ if (Number("\t") !== 0) {
|
|||||||
if (Number("\r") !== 0) {
|
if (Number("\r") !== 0) {
|
||||||
$ERROR('#4.1: Number("\\r") === 0. Actual: ' + (Number("\r")));
|
$ERROR('#4.1: Number("\\r") === 0. Actual: ' + (Number("\r")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\r") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\r") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#4.2: Number("\\r") === +0. Actual: -0');
|
$ERROR('#4.2: Number("\\r") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ if (Number("\r") !== 0) {
|
|||||||
if (Number("\n") !== 0) {
|
if (Number("\n") !== 0) {
|
||||||
$ERROR('#5.1: Number("\\n") === 0. Actual: ' + (Number("\n")));
|
$ERROR('#5.1: Number("\\n") === 0. Actual: ' + (Number("\n")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\n") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\n") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#5.2: Number("\\n") === +0. Actual: -0');
|
$ERROR('#5.2: Number("\\n") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ if (Number("\n") !== 0) {
|
|||||||
if (Number("\f") !== 0) {
|
if (Number("\f") !== 0) {
|
||||||
$ERROR('#6.1: Number("\\f") === 0. Actual: ' + (Number("\f")));
|
$ERROR('#6.1: Number("\\f") === 0. Actual: ' + (Number("\f")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\f") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\f") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#6.2: Number("\\f") === +0. Actual: -0');
|
$ERROR('#6.2: Number("\\f") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ if (Number("\f") !== 0) {
|
|||||||
if (Number("\u0009") !== 0) {
|
if (Number("\u0009") !== 0) {
|
||||||
$ERROR('#7.1: Number("\\u0009") === 0. Actual: ' + (Number("\u0009")));
|
$ERROR('#7.1: Number("\\u0009") === 0. Actual: ' + (Number("\u0009")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u0009") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u0009") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#7.2: Number("\\u0009") === +0. Actual: -0');
|
$ERROR('#7.2: Number("\\u0009") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ if (Number("\u0009") !== 0) {
|
|||||||
if (Number("\u000A") !== 0) {
|
if (Number("\u000A") !== 0) {
|
||||||
$ERROR('#8.1: Number("\\u000A") === 0. Actual: ' + (Number("\u000A")));
|
$ERROR('#8.1: Number("\\u000A") === 0. Actual: ' + (Number("\u000A")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u000A") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u000A") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#8.2: Number("\\u000A") === +0. Actual: -0');
|
$ERROR('#8.2: Number("\\u000A") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ if (Number("\u000A") !== 0) {
|
|||||||
if (Number("\u000B") !== 0) {
|
if (Number("\u000B") !== 0) {
|
||||||
$ERROR('#9.1: Number("\\u000B") === 0. Actual: ' + (Number("\u000B")));
|
$ERROR('#9.1: Number("\\u000B") === 0. Actual: ' + (Number("\u000B")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u000B") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u000B") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#9.1.2: Number("\\u000B") === +0. Actual: -0');
|
$ERROR('#9.1.2: Number("\\u000B") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ if (Number("\u000B") !== 0) {
|
|||||||
if (Number("\u000C") !== 0) {
|
if (Number("\u000C") !== 0) {
|
||||||
$ERROR('#10.1: Number("\\u000C") === 0. Actual: ' + (Number("\u000C")));
|
$ERROR('#10.1: Number("\\u000C") === 0. Actual: ' + (Number("\u000C")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u000C") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u000C") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#10.2: Number("\\u000C") === +0. Actual: -0');
|
$ERROR('#10.2: Number("\\u000C") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ if (Number("\u000C") !== 0) {
|
|||||||
if (Number("\u000D") !== 0) {
|
if (Number("\u000D") !== 0) {
|
||||||
$ERROR('#11.1: Number("\\u000D") === 0. Actual: ' + (Number("\u000D")));
|
$ERROR('#11.1: Number("\\u000D") === 0. Actual: ' + (Number("\u000D")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u000D") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u000D") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#11.2: Number("\\u000D") === +0. Actual: -0');
|
$ERROR('#11.2: Number("\\u000D") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ if (Number("\u000D") !== 0) {
|
|||||||
if (Number("\u00A0") !== 0) {
|
if (Number("\u00A0") !== 0) {
|
||||||
$ERROR('#12.1: Number("\\u00A0") === 0. Actual: ' + (Number("\u00A0")));
|
$ERROR('#12.1: Number("\\u00A0") === 0. Actual: ' + (Number("\u00A0")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u00A0") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u00A0") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#12.2: Number("\\u00A0") === +0. Actual: -0');
|
$ERROR('#12.2: Number("\\u00A0") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ if (Number("\u00A0") !== 0) {
|
|||||||
if (Number("\u0020") !== 0) {
|
if (Number("\u0020") !== 0) {
|
||||||
$ERROR('#13.1: Number("\\u0020") === 0. Actual: ' + (Number("\u0020")));
|
$ERROR('#13.1: Number("\\u0020") === 0. Actual: ' + (Number("\u0020")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u0020") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u0020") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#13.2: Number("\\u0020") === +0. Actual: -0');
|
$ERROR('#13.2: Number("\\u0020") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ if (Number("\u0020") !== 0) {
|
|||||||
if (Number("\u2028") !== 0) {
|
if (Number("\u2028") !== 0) {
|
||||||
$ERROR('#14.1: Number("\\u2028") === 0. Actual: ' + (Number("\u2028")));
|
$ERROR('#14.1: Number("\\u2028") === 0. Actual: ' + (Number("\u2028")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2028") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2028") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#14.2: Number("\\u2028") === +0. Actual: -0');
|
$ERROR('#14.2: Number("\\u2028") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ if (Number("\u2028") !== 0) {
|
|||||||
if (Number("\u2029") !== 0) {
|
if (Number("\u2029") !== 0) {
|
||||||
$ERROR('#15.1: Number("\\u2029") === 0. Actual: ' + (Number("\u2029")));
|
$ERROR('#15.1: Number("\\u2029") === 0. Actual: ' + (Number("\u2029")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2029") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2029") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#15.2: Number("\\u2029") === +0. Actual: -0');
|
$ERROR('#15.2: Number("\\u2029") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ if (Number("\u2029") !== 0) {
|
|||||||
if (Number("\u1680") !== 0) {
|
if (Number("\u1680") !== 0) {
|
||||||
$ERROR('#16.1: Number("\\u1680") === 0. Actual: ' + (Number("\u1680")));
|
$ERROR('#16.1: Number("\\u1680") === 0. Actual: ' + (Number("\u1680")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u1680") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u1680") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#16.2: Number("\\u1680") === +0. Actual: -0');
|
$ERROR('#16.2: Number("\\u1680") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ if (Number("\u1680") !== 0) {
|
|||||||
if (Number("\u2000") !== 0) {
|
if (Number("\u2000") !== 0) {
|
||||||
$ERROR('#17.1: Number("\\u2000") === 0. Actual: ' + (Number("\u2000")));
|
$ERROR('#17.1: Number("\\u2000") === 0. Actual: ' + (Number("\u2000")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2000") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2000") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#17.2: Number("\\u2000") === +0. Actual: -0');
|
$ERROR('#17.2: Number("\\u2000") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ if (Number("\u2000") !== 0) {
|
|||||||
if (Number("\u2001") !== 0) {
|
if (Number("\u2001") !== 0) {
|
||||||
$ERROR('#18.1: Number("\\u2001") === 0. Actual: ' + (Number("\u2001")));
|
$ERROR('#18.1: Number("\\u2001") === 0. Actual: ' + (Number("\u2001")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2001") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2001") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#18.2: Number("\\u2001") === +0. Actual: -0');
|
$ERROR('#18.2: Number("\\u2001") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ if (Number("\u2001") !== 0) {
|
|||||||
if (Number("\u2002") !== 0) {
|
if (Number("\u2002") !== 0) {
|
||||||
$ERROR('#19.1: Number("\\u2002") === 0. Actual: ' + (Number("\u2002")));
|
$ERROR('#19.1: Number("\\u2002") === 0. Actual: ' + (Number("\u2002")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2002") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2002") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#19.2: Number("\\u2002") === +0. Actual: -0');
|
$ERROR('#19.2: Number("\\u2002") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ if (Number("\u2002") !== 0) {
|
|||||||
if (Number("\u2003") !== 0) {
|
if (Number("\u2003") !== 0) {
|
||||||
$ERROR('#20.1: Number("\\u2003") === 0. Actual: ' + (Number("\u2003")));
|
$ERROR('#20.1: Number("\\u2003") === 0. Actual: ' + (Number("\u2003")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2003") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2003") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#20.2: Number("\\u2003") === +0. Actual: -0');
|
$ERROR('#20.2: Number("\\u2003") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ if (Number("\u2003") !== 0) {
|
|||||||
if (Number("\u2004") !== 0) {
|
if (Number("\u2004") !== 0) {
|
||||||
$ERROR('#21.1: Number("\\u2004") === 0. Actual: ' + (Number("\u2004")));
|
$ERROR('#21.1: Number("\\u2004") === 0. Actual: ' + (Number("\u2004")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2004") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2004") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#21.2: Number("\\u2004") === +0. Actual: -0');
|
$ERROR('#21.2: Number("\\u2004") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ if (Number("\u2004") !== 0) {
|
|||||||
if (Number("\u2005") !== 0) {
|
if (Number("\u2005") !== 0) {
|
||||||
$ERROR('#22.1: Number("\\u2005") === 0. Actual: ' + (Number("\u2005")));
|
$ERROR('#22.1: Number("\\u2005") === 0. Actual: ' + (Number("\u2005")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2005") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2005") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#22.2: Number("\\u2005") === +0. Actual: -0');
|
$ERROR('#22.2: Number("\\u2005") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ if (Number("\u2005") !== 0) {
|
|||||||
if (Number("\u2006") !== 0) {
|
if (Number("\u2006") !== 0) {
|
||||||
$ERROR('#23.1: Number("\\u2006") === 0. Actual: ' + (Number("\u2006")));
|
$ERROR('#23.1: Number("\\u2006") === 0. Actual: ' + (Number("\u2006")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2006") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2006") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#23.2: Number("\\u2006") === +0. Actual: -0');
|
$ERROR('#23.2: Number("\\u2006") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ if (Number("\u2006") !== 0) {
|
|||||||
if (Number("\u2007") !== 0) {
|
if (Number("\u2007") !== 0) {
|
||||||
$ERROR('#24.1: Number("\\u2007") === 0. Actual: ' + (Number("\u2007")));
|
$ERROR('#24.1: Number("\\u2007") === 0. Actual: ' + (Number("\u2007")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2007") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2007") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#24.2: Number("\\u2007") === +0. Actual: -0');
|
$ERROR('#24.2: Number("\\u2007") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ if (Number("\u2007") !== 0) {
|
|||||||
if (Number("\u2008") !== 0) {
|
if (Number("\u2008") !== 0) {
|
||||||
$ERROR('#25.1: Number("\\u2008") === 0. Actual: ' + (Number("\u2008")));
|
$ERROR('#25.1: Number("\\u2008") === 0. Actual: ' + (Number("\u2008")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2008") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2008") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#25.2: Number("\\u2008") === +0. Actual: -0');
|
$ERROR('#25.2: Number("\\u2008") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,7 +238,7 @@ if (Number("\u2008") !== 0) {
|
|||||||
if (Number("\u2009") !== 0) {
|
if (Number("\u2009") !== 0) {
|
||||||
$ERROR('#26.1: Number("\\u2009") === 0. Actual: ' + (Number("\u2009")));
|
$ERROR('#26.1: Number("\\u2009") === 0. Actual: ' + (Number("\u2009")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u2009") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u2009") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#26.2: Number("\\u2009") === +0. Actual: -0');
|
$ERROR('#26.2: Number("\\u2009") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ if (Number("\u2009") !== 0) {
|
|||||||
if (Number("\u200A") !== 0) {
|
if (Number("\u200A") !== 0) {
|
||||||
$ERROR('#27.1: Number("\\u200A") === 0. Actual: ' + (Number("\u200A")));
|
$ERROR('#27.1: Number("\\u200A") === 0. Actual: ' + (Number("\u200A")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u200A") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u200A") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#27.2: Number("\\u200A") === +0. Actual: -0');
|
$ERROR('#27.2: Number("\\u200A") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -256,7 +256,7 @@ if (Number("\u200A") !== 0) {
|
|||||||
if (Number("\u202F") !== 0) {
|
if (Number("\u202F") !== 0) {
|
||||||
$ERROR('#28.1: Number("\\u202F") === 0. Actual: ' + (Number("\u202F")));
|
$ERROR('#28.1: Number("\\u202F") === 0. Actual: ' + (Number("\u202F")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u202F") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u202F") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#28.2: Number("\\u202F") === +0. Actual: -0');
|
$ERROR('#28.2: Number("\\u202F") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ if (Number("\u202F") !== 0) {
|
|||||||
if (Number("\u205F") !== 0) {
|
if (Number("\u205F") !== 0) {
|
||||||
$ERROR('#29.1: Number("\\u205F") === 0. Actual: ' + (Number("\u205F")));
|
$ERROR('#29.1: Number("\\u205F") === 0. Actual: ' + (Number("\u205F")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u205F") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u205F") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#29.2: Number("\\u205F") === +0. Actual: -0');
|
$ERROR('#29.2: Number("\\u205F") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ if (Number("\u205F") !== 0) {
|
|||||||
if (Number("\u3000") !== 0) {
|
if (Number("\u3000") !== 0) {
|
||||||
$ERROR('#30.1: Number("\\u3000") === 0. Actual: ' + (Number("\u3000")));
|
$ERROR('#30.1: Number("\\u3000") === 0. Actual: ' + (Number("\u3000")));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number("\u3000") !== Number.POSITIVE_INFINITY) {
|
if (1 / Number("\u3000") !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#30.2: Number("\\u3000") === +0. Actual: -0');
|
$ERROR('#30.2: Number("\\u3000") === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ es5id: 9.3.1_A3_T2
|
|||||||
description: dynamic string
|
description: dynamic string
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function dynaString(s1, s2){
|
function dynaString(s1, s2) {
|
||||||
return String(s1)+String(s2);
|
return String(s1) + String(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
@ -31,7 +31,7 @@ info: |
|
|||||||
features: [u180e]
|
features: [u180e]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function dynaString(s1, s2){
|
function dynaString(s1, s2) {
|
||||||
return String(s1) + String(s2);
|
return String(s1) + String(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ if (Number("+0") !== Number("0")) {
|
|||||||
$ERROR('#1.1: Number("+0") === Number("0")');
|
$ERROR('#1.1: Number("+0") === Number("0")');
|
||||||
} else {
|
} else {
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (1/Number("+0") !== 1/Number("0")) {
|
if (1 / Number("+0") !== 1 / Number("0")) {
|
||||||
$ERROR('#2.2: 1/Number("+0") === 1/Number("0")');
|
$ERROR('#2.2: 1/Number("+0") === 1/Number("0")');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ es5id: 9.3.1_A4_T2
|
|||||||
description: Compare Number('+' + 'any_number') with Number('any_number')
|
description: Compare Number('+' + 'any_number') with Number('any_number')
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function dynaString(s1, s2){
|
function dynaString(s1, s2) {
|
||||||
return String(s1)+String(s2);
|
return String(s1) + String(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
@ -18,7 +18,7 @@ if (Number(dynaString("+", "0")) !== Number("0")) {
|
|||||||
$ERROR('#1: Number("+"+"0") === Number("0")');
|
$ERROR('#1: Number("+"+"0") === Number("0")');
|
||||||
} else {
|
} else {
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (1/Number(dynaString("+", "0")) !== 1/Number("0")) {
|
if (1 / Number(dynaString("+", "0")) !== 1 / Number("0")) {
|
||||||
$ERROR('#2: 1/Number("+"+"0") === 1/Number("0")');
|
$ERROR('#2: 1/Number("+"+"0") === 1/Number("0")');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ if (Number("-0") !== -Number("0")) {
|
|||||||
$ERROR('#1: Number("-0") === -Number("0")');
|
$ERROR('#1: Number("-0") === -Number("0")');
|
||||||
} else {
|
} else {
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (1/Number("-0") !== -1/Number("0")) {
|
if (1 / Number("-0") !== -1 / Number("0")) {
|
||||||
$ERROR('#2: 1/Number("-0") === -1/Number("0")');
|
$ERROR('#2: 1/Number("-0") === -1/Number("0")');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ es5id: 9.3.1_A5_T3
|
|||||||
description: Compare Number('-' + 'any_number') with -Number('any_number')
|
description: Compare Number('-' + 'any_number') with -Number('any_number')
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function dynaString(s1, s2){
|
function dynaString(s1, s2) {
|
||||||
return String(s1)+String(s2);
|
return String(s1) + String(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
@ -18,7 +18,7 @@ if (Number(dynaString("-", "0")) !== -Number("0")) {
|
|||||||
$ERROR('#1: Number("-"+"0") === -Number("0")');
|
$ERROR('#1: Number("-"+"0") === -Number("0")');
|
||||||
} else {
|
} else {
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (1/Number(dynaString("-", "0")) !== -1/Number("0")) {
|
if (1 / Number(dynaString("-", "0")) !== -1 / Number("0")) {
|
||||||
$ERROR('#2: 1/Number("-"+"0") === -1/Number("0")');
|
$ERROR('#2: 1/Number("-"+"0") === -1/Number("0")');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ description: >
|
|||||||
10e10000, 10E10000 and Number("10e10000")
|
10e10000, 10E10000 and Number("10e10000")
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function dynaString(s1, s2){
|
function dynaString(s1, s2) {
|
||||||
return String(s1)+String(s2);
|
return String(s1) + String(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,6 @@ description: Compare Number('1234.5678') with Number('1234')+(+('5678')*1e-4)
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
if (Number("1234.5678") !== Number("1234")+(+("5678")*1e-4)) {
|
if (Number("1234.5678") !== Number("1234") + (+("5678") * 1e-4)) {
|
||||||
$ERROR('#1: Number("1234.5678") === Number("1234")+(+("5678")*1e-4)');
|
$ERROR('#1: Number("1234.5678") === Number("1234")+(+("5678")*1e-4)');
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,11 @@ description: >
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
if (Number("1234e5") !== Number("1234")*1e5) {
|
if (Number("1234e5") !== Number("1234") * 1e5) {
|
||||||
$ERROR('#1: Number("1234e5") === Number("1234")*1e5');
|
$ERROR('#1: Number("1234e5") === Number("1234")*1e5');
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (Number("1234.e5") !== +("1234")*1e5) {
|
if (Number("1234.e5") !== +("1234") * 1e5) {
|
||||||
$ERROR('#2: Number("1234.e5") === +("1234")*1e5');
|
$ERROR('#2: Number("1234.e5") === +("1234")*1e5');
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,11 @@ description: >
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
if (Number("1234.5678e9") !== (Number("1234")+(Number("5678")*1e-4))*1e9) {
|
if (Number("1234.5678e9") !== (Number("1234") + (Number("5678") * 1e-4)) * 1e9) {
|
||||||
$ERROR('#1: Number("1234.5678e9") === (Number("1234")+(Number("5678")*1e-4))*1e9');
|
$ERROR('#1: Number("1234.5678e9") === (Number("1234")+(Number("5678")*1e-4))*1e9');
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#2
|
// CHECK#2
|
||||||
if (+("1234.5678e-9") !== (Number("1234")+(Number("5678")*1e-4))*1e-9) {
|
if (+("1234.5678e-9") !== (Number("1234") + (Number("5678") * 1e-4)) * 1e-9) {
|
||||||
$ERROR('#2: +("1234.5678e-9") === (Number("1234")+(Number("5678")*1e-4))*1e-9');
|
$ERROR('#2: +("1234.5678e-9") === (Number("1234")+(Number("5678")*1e-4))*1e-9');
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ description: null convert to Number by explicit transformation
|
|||||||
if (Number(null) !== 0) {
|
if (Number(null) !== 0) {
|
||||||
$ERROR('#1.1: Number(null) === 0. Actual: ' + (Number(null)));
|
$ERROR('#1.1: Number(null) === 0. Actual: ' + (Number(null)));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(null) !== Number.POSITIVE_INFINITY) {
|
if (1 / Number(null) !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#1.2: Number(null) === +0. Actual: -0');
|
$ERROR('#1.2: Number(null) === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ description: False and true convert to Number by explicit transformation
|
|||||||
if (Number(false) !== +0) {
|
if (Number(false) !== +0) {
|
||||||
$ERROR('#1.1: Number(false) === 0. Actual: ' + (Number(false)));
|
$ERROR('#1.1: Number(false) === 0. Actual: ' + (Number(false)));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(false) !== Number.POSITIVE_INFINITY) {
|
if (1 / Number(false) !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#1.2: Number(false) === +0. Actual: -0');
|
$ERROR('#1.2: Number(false) === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ assert.sameValue(Number(NaN), NaN, "NaN");
|
|||||||
if (Number(+0) !== +0) {
|
if (Number(+0) !== +0) {
|
||||||
$ERROR('#2.1: Number(+0) === 0. Actual: ' + (Number(+0)));
|
$ERROR('#2.1: Number(+0) === 0. Actual: ' + (Number(+0)));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(+0) !== Number.POSITIVE_INFINITY) {
|
if (1 / Number(+0) !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#2.2: Number(+0) === +0. Actual: -0');
|
$ERROR('#2.2: Number(+0) === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ if (Number(+0) !== +0) {
|
|||||||
if (Number(-0) !== -0) {
|
if (Number(-0) !== -0) {
|
||||||
$ERROR('#3.1: Number(-0) === 0. Actual: ' + (Number(-0)));
|
$ERROR('#3.1: Number(-0) === 0. Actual: ' + (Number(-0)));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(-0) !== Number.NEGATIVE_INFINITY) {
|
if (1 / Number(-0) !== Number.NEGATIVE_INFINITY) {
|
||||||
$ERROR('#3.2: Number(-0) === -0. Actual: +0');
|
$ERROR('#3.2: Number(-0) === -0. Actual: +0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ assert.sameValue(Number(new Number(NaN)), NaN, "Number(new Number(NaN)");
|
|||||||
if (Number(new Number(null)) !== 0) {
|
if (Number(new Number(null)) !== 0) {
|
||||||
$ERROR('#4.1: Number(new Number(null)) === 0. Actual: ' + (Number(new Number(null))));
|
$ERROR('#4.1: Number(new Number(null)) === 0. Actual: ' + (Number(new Number(null))));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(new Number(null)) !== Number.POSITIVE_INFINITY) {
|
if (1 / Number(new Number(null)) !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#4.2: Number(new Number(null)) === +0. Actual: -0');
|
$ERROR('#4.2: Number(new Number(null)) === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ if (Number(new Number(true)) !== 1) {
|
|||||||
if (Number(new Number(false)) !== +0) {
|
if (Number(new Number(false)) !== +0) {
|
||||||
$ERROR('#7.1: Number(new Number(false)) === 0. Actual: ' + (Number(new Number(false))));
|
$ERROR('#7.1: Number(new Number(false)) === 0. Actual: ' + (Number(new Number(false))));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(new Number(false)) !== Number.POSITIVE_INFINITY) {
|
if (1 / Number(new Number(false)) !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#7.2: Number(new Number(false)) === +0. Actual: -0');
|
$ERROR('#7.2: Number(new Number(false)) === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,56 +60,78 @@ if (Number(new Boolean(true)) !== 1) {
|
|||||||
if (Number(new Boolean(false)) !== +0) {
|
if (Number(new Boolean(false)) !== +0) {
|
||||||
$ERROR('#9.1: Number(new Boolean(false)) === 0. Actual: ' + (Number(new Boolean(false))));
|
$ERROR('#9.1: Number(new Boolean(false)) === 0. Actual: ' + (Number(new Boolean(false))));
|
||||||
} else {
|
} else {
|
||||||
if (1/Number(new Boolean(false)) !== Number.POSITIVE_INFINITY) {
|
if (1 / Number(new Boolean(false)) !== Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#9.2: Number(new Boolean(false)) === +0. Actual: -0');
|
$ERROR('#9.2: Number(new Boolean(false)) === +0. Actual: -0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#10
|
// CHECK#10
|
||||||
assert.sameValue(Number(new Array(2,4,8,16,32)), NaN, "Number(new Array(2,4,8,16,32))");
|
assert.sameValue(Number(new Array(2, 4, 8, 16, 32)), NaN, "Number(new Array(2,4,8,16,32))");
|
||||||
|
|
||||||
// CHECK#11
|
// CHECK#11
|
||||||
var myobj1 = {
|
var myobj1 = {
|
||||||
ToNumber : function(){return 12345;},
|
ToNumber: function() {
|
||||||
toString : function(){return "67890";},
|
return 12345;
|
||||||
valueOf : function(){return "[object MyObj]";}
|
},
|
||||||
};
|
toString: function() {
|
||||||
|
return "67890";
|
||||||
|
},
|
||||||
|
valueOf: function() {
|
||||||
|
return "[object MyObj]";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
assert.sameValue(Number(myobj1), NaN, "Number(myobj1)");
|
assert.sameValue(Number(myobj1), NaN, "Number(myobj1)");
|
||||||
|
|
||||||
// CHECK#12
|
// CHECK#12
|
||||||
var myobj2 = {
|
var myobj2 = {
|
||||||
ToNumber : function(){return 12345;},
|
ToNumber: function() {
|
||||||
toString : function(){return "67890";},
|
return 12345;
|
||||||
valueOf : function(){return "9876543210";}
|
},
|
||||||
};
|
toString: function() {
|
||||||
|
return "67890";
|
||||||
|
},
|
||||||
|
valueOf: function() {
|
||||||
|
return "9876543210";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (Number(myobj2) !== 9876543210){
|
if (Number(myobj2) !== 9876543210) {
|
||||||
$ERROR("#12: Number(myobj2) calls ToPrimitive with hint Number. Exptected: 9876543210. Actual: " + (Number(myobj2)));
|
$ERROR("#12: Number(myobj2) calls ToPrimitive with hint Number. Exptected: 9876543210. Actual: " + (Number(myobj2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// CHECK#13
|
// CHECK#13
|
||||||
var myobj3 = {
|
var myobj3 = {
|
||||||
ToNumber : function(){return 12345;},
|
ToNumber: function() {
|
||||||
toString : function(){return "[object MyObj]";}
|
return 12345;
|
||||||
};
|
},
|
||||||
|
toString: function() {
|
||||||
|
return "[object MyObj]";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
assert.sameValue(Number(myobj3), NaN, "Number(myobj3)");
|
assert.sameValue(Number(myobj3), NaN, "Number(myobj3)");
|
||||||
|
|
||||||
// CHECK#14
|
// CHECK#14
|
||||||
var myobj4 = {
|
var myobj4 = {
|
||||||
ToNumber : function(){return 12345;},
|
ToNumber: function() {
|
||||||
toString : function(){return "67890";}
|
return 12345;
|
||||||
};
|
},
|
||||||
|
toString: function() {
|
||||||
|
return "67890";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (Number(myobj4) !== 67890){
|
if (Number(myobj4) !== 67890) {
|
||||||
$ERROR("#14: Number(myobj4) calls ToPrimitive with hint Number. Exptected: 67890. Actual: " + (Number(myobj4)));
|
$ERROR("#14: Number(myobj4) calls ToPrimitive with hint Number. Exptected: 67890. Actual: " + (Number(myobj4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK#15
|
// CHECK#15
|
||||||
var myobj5 = {
|
var myobj5 = {
|
||||||
ToNumber : function(){return 12345;}
|
ToNumber: function() {
|
||||||
};
|
return 12345;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
assert.sameValue(Number(myobj5), NaN, "Number(myobj5)");
|
assert.sameValue(Number(myobj5), NaN, "Number(myobj5)");
|
||||||
|
@ -6,6 +6,6 @@ es5id: 15.7.3.1-2
|
|||||||
description: Number.prototype, initial value is the Number prototype object
|
description: Number.prototype, initial value is the Number prototype object
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// assume that Number.prototype has not been modified.
|
// assume that Number.prototype has not been modified.
|
||||||
|
|
||||||
assert.sameValue(Object.getPrototypeOf(new Number(42)), Number.prototype, 'Object.getPrototypeOf(new Number(42))');
|
assert.sameValue(Object.getPrototypeOf(new Number(42)), Number.prototype, 'Object.getPrototypeOf(new Number(42))');
|
||||||
|
@ -10,6 +10,6 @@ description: Checking value of Number.prototype property
|
|||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (Number.prototype != 0) {
|
if (Number.prototype != 0) {
|
||||||
$ERROR('#2: Number.prototype == +0');
|
$ERROR('#2: Number.prototype == +0');
|
||||||
} else if( 1/Number.prototype != Number.POSITIVE_INFINITY){
|
} else if (1 / Number.prototype != Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#2: Number.prototype == +0');
|
$ERROR('#2: Number.prototype == +0');
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ if (typeof Number.prototype !== "object") {
|
|||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (Number.prototype != 0) {
|
if (Number.prototype != 0) {
|
||||||
$ERROR('#2: Number.prototype == +0');
|
$ERROR('#2: Number.prototype == +0');
|
||||||
} else if( 1/Number.prototype != Number.POSITIVE_INFINITY){
|
} else if (1 / Number.prototype != Number.POSITIVE_INFINITY) {
|
||||||
$ERROR('#2: Number.prototype == +0');
|
$ERROR('#2: Number.prototype == +0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,6 @@ description: The test uses hasOwnProperty() method
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.hasOwnProperty("constructor") !== true){
|
if (Number.prototype.hasOwnProperty("constructor") !== true) {
|
||||||
$ERROR('#1: The Number prototype object has the property constructor');
|
$ERROR('#1: The Number prototype object has the property constructor');
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,6 @@ description: The test uses hasOwnProperty() method
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.hasOwnProperty("toString") !== true){
|
if (Number.prototype.hasOwnProperty("toString") !== true) {
|
||||||
$ERROR('#1: The Number prototype object has the property toString');
|
$ERROR('#1: The Number prototype object has the property toString');
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,6 @@ description: The test uses hasOwnProperty() method
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.hasOwnProperty("toLocaleString") !== true){
|
if (Number.prototype.hasOwnProperty("toLocaleString") !== true) {
|
||||||
$ERROR('#1: The Number prototype object has the property toLocaleString');
|
$ERROR('#1: The Number prototype object has the property toLocaleString');
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,6 @@ description: The test uses hasOwnProperty() method
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.hasOwnProperty("valueOf") !== true){
|
if (Number.prototype.hasOwnProperty("valueOf") !== true) {
|
||||||
$ERROR('#1: The Number prototype object has the property valueOf');
|
$ERROR('#1: The Number prototype object has the property valueOf');
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,6 @@ description: The test uses hasOwnProperty() method
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.hasOwnProperty("toFixed") !== true){
|
if (Number.prototype.hasOwnProperty("toFixed") !== true) {
|
||||||
$ERROR('#1: The Number prototype object has the property toFixed');
|
$ERROR('#1: The Number prototype object has the property toFixed');
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,6 @@ description: The test uses hasOwnProperty() method
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.hasOwnProperty("toExponential") !== true){
|
if (Number.prototype.hasOwnProperty("toExponential") !== true) {
|
||||||
$ERROR('#1: The Number prototype object has the property toExponential');
|
$ERROR('#1: The Number prototype object has the property toExponential');
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,6 @@ description: The test uses hasOwnProperty() method
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.hasOwnProperty("toPrecision") !== true){
|
if (Number.prototype.hasOwnProperty("toPrecision") !== true) {
|
||||||
$ERROR('#1: The Number prototype object has the property toPrecision');
|
$ERROR('#1: The Number prototype object has the property toPrecision');
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,3 @@ assert.throws(RangeError, () => (3).toExponential(-1));
|
|||||||
|
|
||||||
assert.sameValue((3).toExponential(100), "3.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+0");
|
assert.sameValue((3).toExponential(100), "3.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+0");
|
||||||
assert.throws(RangeError, () => (3).toExponential(101));
|
assert.throws(RangeError, () => (3).toExponential(101));
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,62 +10,62 @@ description: calling on Number prototype object
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toFixed() !== "0"){
|
if (Number.prototype.toFixed() !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toFixed() === "0"');
|
$ERROR('#1: Number.prototype.toFixed() === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if(Number.prototype.toFixed(0) !== "0"){
|
if (Number.prototype.toFixed(0) !== "0") {
|
||||||
$ERROR('#2: Number.prototype.toFixed(0) === "0"');
|
$ERROR('#2: Number.prototype.toFixed(0) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if(Number.prototype.toFixed(1) !== "0.0"){
|
if (Number.prototype.toFixed(1) !== "0.0") {
|
||||||
$ERROR('#3: Number.prototype.toFixed(1) === "0.0"');
|
$ERROR('#3: Number.prototype.toFixed(1) === "0.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if(Number.prototype.toFixed(1.1) !== "0.0"){
|
if (Number.prototype.toFixed(1.1) !== "0.0") {
|
||||||
$ERROR('#4: Number.prototype.toFixed(1.1) === "0.0"');
|
$ERROR('#4: Number.prototype.toFixed(1.1) === "0.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if(Number.prototype.toFixed(0.9) !== "0"){
|
if (Number.prototype.toFixed(0.9) !== "0") {
|
||||||
$ERROR('#5: Number.prototype.toFixed(0.9) === "0"');
|
$ERROR('#5: Number.prototype.toFixed(0.9) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if(Number.prototype.toFixed("1") !== "0.0"){
|
if (Number.prototype.toFixed("1") !== "0.0") {
|
||||||
$ERROR('#6: Number.prototype.toFixed("1") === "0.0"');
|
$ERROR('#6: Number.prototype.toFixed("1") === "0.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if(Number.prototype.toFixed("1.1") !== "0.0"){
|
if (Number.prototype.toFixed("1.1") !== "0.0") {
|
||||||
$ERROR('#7: Number.prototype.toFixed("1.1") === "0.0"');
|
$ERROR('#7: Number.prototype.toFixed("1.1") === "0.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if(Number.prototype.toFixed("0.9") !== "0"){
|
if (Number.prototype.toFixed("0.9") !== "0") {
|
||||||
$ERROR('#8: Number.prototype.toFixed("0.9") === "0"');
|
$ERROR('#8: Number.prototype.toFixed("0.9") === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#9
|
//CHECK#9
|
||||||
if(Number.prototype.toFixed(Number.NaN) !== "0"){
|
if (Number.prototype.toFixed(Number.NaN) !== "0") {
|
||||||
$ERROR('#9: Number.prototype.toFixed(Number.NaN) === "0"');
|
$ERROR('#9: Number.prototype.toFixed(Number.NaN) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
if(Number.prototype.toFixed("some string") !== "0"){
|
if (Number.prototype.toFixed("some string") !== "0") {
|
||||||
$ERROR('#9: Number.prototype.toFixed("some string") === "0"');
|
$ERROR('#9: Number.prototype.toFixed("some string") === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#11
|
//CHECK#11
|
||||||
try{
|
try {
|
||||||
if(Number.prototype.toFixed(-0.1) !== "0"){
|
if (Number.prototype.toFixed(-0.1) !== "0") {
|
||||||
$ERROR('#10: Number.prototype.toFixed(-0.1) === "0"');
|
$ERROR('#10: Number.prototype.toFixed(-0.1) === "0"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(e){
|
catch (e) {
|
||||||
$ERROR('#10: Number.prototype.toFixed(-0.1) should not throw '+e);
|
$ERROR('#10: Number.prototype.toFixed(-0.1) should not throw ' + e);
|
||||||
}
|
}
|
||||||
|
@ -10,61 +10,61 @@ description: calling on Number object
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number(1)).toFixed() !== "1"){
|
if ((new Number(1)).toFixed() !== "1") {
|
||||||
$ERROR('#1: (new Number(1)).prototype.toFixed() === "1"');
|
$ERROR('#1: (new Number(1)).prototype.toFixed() === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number(1)).toFixed(0) !== "1"){
|
if ((new Number(1)).toFixed(0) !== "1") {
|
||||||
$ERROR('#2: (new Number(1)).prototype.toFixed(0) === "1"');
|
$ERROR('#2: (new Number(1)).prototype.toFixed(0) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(1)).toFixed(1) !== "1.0"){
|
if ((new Number(1)).toFixed(1) !== "1.0") {
|
||||||
$ERROR('#3: (new Number(1)).prototype.toFixed(1) === "1.0"');
|
$ERROR('#3: (new Number(1)).prototype.toFixed(1) === "1.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(1)).toFixed(1.1) !== "1.0"){
|
if ((new Number(1)).toFixed(1.1) !== "1.0") {
|
||||||
$ERROR('#4: (new Number(1)).toFixed(1.1) === "1.0"');
|
$ERROR('#4: (new Number(1)).toFixed(1.1) === "1.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toFixed(0.9) !== "1"){
|
if ((new Number(1)).toFixed(0.9) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toFixed(0.9) === "1"');
|
$ERROR('#5: (new Number(1)).toFixed(0.9) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(1)).toFixed("1") !== "1.0"){
|
if ((new Number(1)).toFixed("1") !== "1.0") {
|
||||||
$ERROR('#6: (new Number(1)).toFixed("1") === "1.0"');
|
$ERROR('#6: (new Number(1)).toFixed("1") === "1.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(1)).toFixed("1.1") !== "1.0"){
|
if ((new Number(1)).toFixed("1.1") !== "1.0") {
|
||||||
$ERROR('#7: (new Number(1)).toFixed("1.1") === "1.0"');
|
$ERROR('#7: (new Number(1)).toFixed("1.1") === "1.0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(1)).toFixed("0.9") !== "1"){
|
if ((new Number(1)).toFixed("0.9") !== "1") {
|
||||||
$ERROR('#8: (new Number(1)).toFixed("0.9") === "1"');
|
$ERROR('#8: (new Number(1)).toFixed("0.9") === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#9
|
//CHECK#9
|
||||||
if((new Number(1)).toFixed(Number.NaN) !== "1"){
|
if ((new Number(1)).toFixed(Number.NaN) !== "1") {
|
||||||
$ERROR('#9: (new Number(1)).toFixed(Number.NaN) === "1"');
|
$ERROR('#9: (new Number(1)).toFixed(Number.NaN) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
if((new Number(1)).toFixed("some string") !== "1"){
|
if ((new Number(1)).toFixed("some string") !== "1") {
|
||||||
$ERROR('#9: (new Number(1)).toFixed("some string") === "1"');
|
$ERROR('#9: (new Number(1)).toFixed("some string") === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
try{
|
try {
|
||||||
if((new Number(1)).toFixed(-0.1) !== "1"){
|
if ((new Number(1)).toFixed(-0.1) !== "1") {
|
||||||
$ERROR('#10: (new Number(1)).toFixed(-0.1) === "1"');
|
$ERROR('#10: (new Number(1)).toFixed(-0.1) === "1"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(e){
|
catch (e) {
|
||||||
$ERROR('#10: (new Number(1)).toFixed(-0.1) should not throw '+e);
|
$ERROR('#10: (new Number(1)).toFixed(-0.1) should not throw ' + e);
|
||||||
}
|
}
|
||||||
|
@ -8,62 +8,62 @@ description: NaN is computed by new Number("string")
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number("a")).toFixed() !== "NaN"){
|
if ((new Number("a")).toFixed() !== "NaN") {
|
||||||
$ERROR('#1: (new Number("a")).prototype.toFixed() === "NaN"');
|
$ERROR('#1: (new Number("a")).prototype.toFixed() === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number("a")).toFixed(0) !== "NaN"){
|
if ((new Number("a")).toFixed(0) !== "NaN") {
|
||||||
$ERROR('#2: (new Number("a")).prototype.toFixed(0) === "NaN"');
|
$ERROR('#2: (new Number("a")).prototype.toFixed(0) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number("a")).toFixed(1) !== "NaN"){
|
if ((new Number("a")).toFixed(1) !== "NaN") {
|
||||||
$ERROR('#3: (new Number("a")).prototype.toFixed(1) === "NaN"');
|
$ERROR('#3: (new Number("a")).prototype.toFixed(1) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number("a")).toFixed(1.1) !== "NaN"){
|
if ((new Number("a")).toFixed(1.1) !== "NaN") {
|
||||||
$ERROR('#4: (new Number("a")).toFixed(1.1) === "NaN"');
|
$ERROR('#4: (new Number("a")).toFixed(1.1) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number("a")).toFixed(0.9) !== "NaN"){
|
if ((new Number("a")).toFixed(0.9) !== "NaN") {
|
||||||
$ERROR('#5: (new Number("a")).toFixed(0.9) === "NaN"');
|
$ERROR('#5: (new Number("a")).toFixed(0.9) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number("a")).toFixed("1") !== "NaN"){
|
if ((new Number("a")).toFixed("1") !== "NaN") {
|
||||||
$ERROR('#6: (new Number("a")).toFixed("1") === "NaN"');
|
$ERROR('#6: (new Number("a")).toFixed("1") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number("a")).toFixed("1.1") !== "NaN"){
|
if ((new Number("a")).toFixed("1.1") !== "NaN") {
|
||||||
$ERROR('#7: (new Number("a")).toFixed("1.1") === "NaN"');
|
$ERROR('#7: (new Number("a")).toFixed("1.1") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number("a")).toFixed("0.9") !== "NaN"){
|
if ((new Number("a")).toFixed("0.9") !== "NaN") {
|
||||||
$ERROR('#8: (new Number("a")).toFixed("0.9") === "NaN"');
|
$ERROR('#8: (new Number("a")).toFixed("0.9") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#9
|
//CHECK#9
|
||||||
if((new Number("a")).toFixed(Number.NaN) !== "NaN"){
|
if ((new Number("a")).toFixed(Number.NaN) !== "NaN") {
|
||||||
$ERROR('#9: (new Number("a")).toFixed(Number.NaN) === "NaN"');
|
$ERROR('#9: (new Number("a")).toFixed(Number.NaN) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
if((new Number("a")).toFixed("some string") !== "NaN"){
|
if ((new Number("a")).toFixed("some string") !== "NaN") {
|
||||||
$ERROR('#9: (new Number("a")).toFixed("some string") === "NaN"');
|
$ERROR('#9: (new Number("a")).toFixed("some string") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
try{
|
try {
|
||||||
s = (new Number("a")).toFixed(Number.POSITIVE_INFINITY);
|
s = (new Number("a")).toFixed(Number.POSITIVE_INFINITY);
|
||||||
$ERROR('#10: (new Number("a")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');
|
$ERROR('#10: (new Number("a")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');
|
||||||
}
|
}
|
||||||
catch(e){
|
catch (e) {
|
||||||
if(!(e instanceof RangeError)){
|
if (!(e instanceof RangeError)) {
|
||||||
$ERROR('#10: (new Number("a")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e);
|
$ERROR('#10: (new Number("a")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not ' + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,62 +8,62 @@ description: direct usage of NaN
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.NaN.toFixed() !== "NaN"){
|
if (Number.NaN.toFixed() !== "NaN") {
|
||||||
$ERROR('#1: Number.NaN.prototype.toFixed() === "NaN"');
|
$ERROR('#1: Number.NaN.prototype.toFixed() === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if(Number.NaN.toFixed(0) !== "NaN"){
|
if (Number.NaN.toFixed(0) !== "NaN") {
|
||||||
$ERROR('#2: Number.NaN.prototype.toFixed(0) === "NaN"');
|
$ERROR('#2: Number.NaN.prototype.toFixed(0) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if(Number.NaN.toFixed(1) !== "NaN"){
|
if (Number.NaN.toFixed(1) !== "NaN") {
|
||||||
$ERROR('#3: Number.NaN.prototype.toFixed(1) === "NaN"');
|
$ERROR('#3: Number.NaN.prototype.toFixed(1) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if(Number.NaN.toFixed(1.1) !== "NaN"){
|
if (Number.NaN.toFixed(1.1) !== "NaN") {
|
||||||
$ERROR('#4: Number.NaN.toFixed(1.1) === "NaN"');
|
$ERROR('#4: Number.NaN.toFixed(1.1) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if(Number.NaN.toFixed(0.9) !== "NaN"){
|
if (Number.NaN.toFixed(0.9) !== "NaN") {
|
||||||
$ERROR('#5: Number.NaN.toFixed(0.9) === "NaN"');
|
$ERROR('#5: Number.NaN.toFixed(0.9) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if(Number.NaN.toFixed("1") !== "NaN"){
|
if (Number.NaN.toFixed("1") !== "NaN") {
|
||||||
$ERROR('#6: Number.NaN.toFixed("1") === "NaN"');
|
$ERROR('#6: Number.NaN.toFixed("1") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if(Number.NaN.toFixed("1.1") !== "NaN"){
|
if (Number.NaN.toFixed("1.1") !== "NaN") {
|
||||||
$ERROR('#7: Number.NaN.toFixed("1.1") === "NaN"');
|
$ERROR('#7: Number.NaN.toFixed("1.1") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if(Number.NaN.toFixed("0.9") !== "NaN"){
|
if (Number.NaN.toFixed("0.9") !== "NaN") {
|
||||||
$ERROR('#8: Number.NaN.toFixed("0.9") === "NaN"');
|
$ERROR('#8: Number.NaN.toFixed("0.9") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#9
|
//CHECK#9
|
||||||
if(Number.NaN.toFixed(Number.NaN) !== "NaN"){
|
if (Number.NaN.toFixed(Number.NaN) !== "NaN") {
|
||||||
$ERROR('#9: Number.NaN.toFixed(Number.NaN) === "NaN"');
|
$ERROR('#9: Number.NaN.toFixed(Number.NaN) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
if(Number.NaN.toFixed("some string") !== "NaN"){
|
if (Number.NaN.toFixed("some string") !== "NaN") {
|
||||||
$ERROR('#9: Number.NaN.toFixed("some string") === "NaN"');
|
$ERROR('#9: Number.NaN.toFixed("some string") === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
try{
|
try {
|
||||||
s = Number.NaN.toFixed(Number.POSITIVE_INFINITY);
|
s = Number.NaN.toFixed(Number.POSITIVE_INFINITY);
|
||||||
$ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');
|
$ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');
|
||||||
}
|
}
|
||||||
catch(e){
|
catch (e) {
|
||||||
if(!(e instanceof RangeError)){
|
if (!(e instanceof RangeError)) {
|
||||||
$ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e);
|
$ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not ' + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,62 +8,62 @@ description: x is 10^21
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if((new Number(1e21)).toFixed() !== String(1e21)){
|
if ((new Number(1e21)).toFixed() !== String(1e21)) {
|
||||||
$ERROR('#1: (new Number(1e21)).prototype.toFixed() === String(1e21)');
|
$ERROR('#1: (new Number(1e21)).prototype.toFixed() === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number(1e21)).toFixed(0) !== String(1e21)){
|
if ((new Number(1e21)).toFixed(0) !== String(1e21)) {
|
||||||
$ERROR('#2: (new Number(1e21)).prototype.toFixed(0) === String(1e21)');
|
$ERROR('#2: (new Number(1e21)).prototype.toFixed(0) === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(1e21)).toFixed(1) !== String(1e21)){
|
if ((new Number(1e21)).toFixed(1) !== String(1e21)) {
|
||||||
$ERROR('#3: (new Number(1e21)).prototype.toFixed(1) === String(1e21)');
|
$ERROR('#3: (new Number(1e21)).prototype.toFixed(1) === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(1e21)).toFixed(1.1) !== String(1e21)){
|
if ((new Number(1e21)).toFixed(1.1) !== String(1e21)) {
|
||||||
$ERROR('#4: (new Number(1e21)).toFixed(1.1) === String(1e21)');
|
$ERROR('#4: (new Number(1e21)).toFixed(1.1) === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1e21)).toFixed(0.9) !== String(1e21)){
|
if ((new Number(1e21)).toFixed(0.9) !== String(1e21)) {
|
||||||
$ERROR('#5: (new Number(1e21)).toFixed(0.9) === String(1e21)');
|
$ERROR('#5: (new Number(1e21)).toFixed(0.9) === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(1e21)).toFixed("1") !== String(1e21)){
|
if ((new Number(1e21)).toFixed("1") !== String(1e21)) {
|
||||||
$ERROR('#6: (new Number(1e21)).toFixed("1") === String(1e21)');
|
$ERROR('#6: (new Number(1e21)).toFixed("1") === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(1e21)).toFixed("1.1") !== String(1e21)){
|
if ((new Number(1e21)).toFixed("1.1") !== String(1e21)) {
|
||||||
$ERROR('#7: (new Number(1e21)).toFixed("1.1") === String(1e21)');
|
$ERROR('#7: (new Number(1e21)).toFixed("1.1") === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(1e21)).toFixed("0.9") !== String(1e21)){
|
if ((new Number(1e21)).toFixed("0.9") !== String(1e21)) {
|
||||||
$ERROR('#8: (new Number(1e21)).toFixed("0.9") === String(1e21)');
|
$ERROR('#8: (new Number(1e21)).toFixed("0.9") === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#9
|
//CHECK#9
|
||||||
if((new Number(1e21)).toFixed(Number.NaN) !== String(1e21)){
|
if ((new Number(1e21)).toFixed(Number.NaN) !== String(1e21)) {
|
||||||
$ERROR('#9: (new Number(1e21)).toFixed(Number.NaN) === String(1e21)');
|
$ERROR('#9: (new Number(1e21)).toFixed(Number.NaN) === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
if((new Number(1e21)).toFixed("some string") !== String(1e21)){
|
if ((new Number(1e21)).toFixed("some string") !== String(1e21)) {
|
||||||
$ERROR('#9: (new Number(1e21)).toFixed("some string") === String(1e21)');
|
$ERROR('#9: (new Number(1e21)).toFixed("some string") === String(1e21)');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#10
|
//CHECK#10
|
||||||
try{
|
try {
|
||||||
s = (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY);
|
s = (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY);
|
||||||
$ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');
|
$ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');
|
||||||
}
|
}
|
||||||
catch(e){
|
catch (e) {
|
||||||
if(!(e instanceof RangeError)){
|
if (!(e instanceof RangeError)) {
|
||||||
$ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e);
|
$ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not ' + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,11 @@ description: Checking Number prototype itself
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toFixed.hasOwnProperty("length") !== true){
|
if (Number.prototype.toFixed.hasOwnProperty("length") !== true) {
|
||||||
$ERROR('#1: The length property of the toFixed method is 1');
|
$ERROR('#1: The length property of the toFixed method is 1');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if(Number.prototype.toFixed.length !== 1){
|
if (Number.prototype.toFixed.length !== 1) {
|
||||||
$ERROR('#2: The length property of the toFixed method is 1');
|
$ERROR('#2: The length property of the toFixed method is 1');
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,4 @@ description: >
|
|||||||
Number.prototype.toFixed returns a string value
|
Number.prototype.toFixed returns a string value
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(typeof (123.456).toFixed(), "string");
|
assert.sameValue(typeof(123.456).toFixed(), "string");
|
||||||
|
@ -18,4 +18,3 @@ assert.throws(RangeError, () => (3).toPrecision(-10));
|
|||||||
|
|
||||||
assert.sameValue((3).toPrecision(100), "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
|
assert.sameValue((3).toPrecision(100), "3.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
|
||||||
assert.throws(RangeError, () => (3).toPrecision(101));
|
assert.throws(RangeError, () => (3).toPrecision(101));
|
||||||
|
|
||||||
|
@ -11,41 +11,41 @@ description: undefined radix
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString() !== "0"){
|
if (Number.prototype.toString() !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString() === "0"');
|
$ERROR('#1: Number.prototype.toString() === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString() !== "0"){
|
if ((new Number()).toString() !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString() === "0"');
|
$ERROR('#2: (new Number()).toString() === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString() !== "0"){
|
if ((new Number(0)).toString() !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString() === "0"');
|
$ERROR('#3: (new Number(0)).toString() === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString() !== "-1"){
|
if ((new Number(-1)).toString() !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString() === "-1"');
|
$ERROR('#4: (new Number(-1)).toString() === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString() !== "1"){
|
if ((new Number(1)).toString() !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString() === "1"');
|
$ERROR('#5: (new Number(1)).toString() === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString() !== "NaN"){
|
if ((new Number(Number.NaN)).toString() !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString() === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString() === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString() !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString() !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString() === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString() === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString() !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString() !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString() === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString() === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -11,41 +11,41 @@ description: radix is 10
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(10) !== "0"){
|
if (Number.prototype.toString(10) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(10) === "0"');
|
$ERROR('#1: Number.prototype.toString(10) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(10) !== "0"){
|
if ((new Number()).toString(10) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(10) === "0"');
|
$ERROR('#2: (new Number()).toString(10) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(10) !== "0"){
|
if ((new Number(0)).toString(10) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(10) === "0"');
|
$ERROR('#3: (new Number(0)).toString(10) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(10) !== "-1"){
|
if ((new Number(-1)).toString(10) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(10) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(10) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(10) !== "1"){
|
if ((new Number(1)).toString(10) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(10) === "1"');
|
$ERROR('#5: (new Number(1)).toString(10) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(10) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(10) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(10) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(10) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(10) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(10) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(10) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(10) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(10) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(10) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(10) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(10) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -11,41 +11,41 @@ description: radix is undefined value
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(undefined) !== "0"){
|
if (Number.prototype.toString(undefined) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(undefined) === "0"');
|
$ERROR('#1: Number.prototype.toString(undefined) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(undefined) !== "0"){
|
if ((new Number()).toString(undefined) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(undefined) === "0"');
|
$ERROR('#2: (new Number()).toString(undefined) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(undefined) !== "0"){
|
if ((new Number(0)).toString(undefined) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(undefined) === "0"');
|
$ERROR('#3: (new Number(0)).toString(undefined) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(undefined) !== "-1"){
|
if ((new Number(-1)).toString(undefined) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(undefined) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(undefined) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(undefined) !== "1"){
|
if ((new Number(1)).toString(undefined) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(undefined) === "1"');
|
$ERROR('#5: (new Number(1)).toString(undefined) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(undefined) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(undefined) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(undefined) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(undefined) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(undefined) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(undefined) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(undefined) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(undefined) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(undefined) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(undefined) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(undefined) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(undefined) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 2
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(2) !== "0"){
|
if (Number.prototype.toString(2) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(2) === "0"');
|
$ERROR('#1: Number.prototype.toString(2) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(2) !== "0"){
|
if ((new Number()).toString(2) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(2) === "0"');
|
$ERROR('#2: (new Number()).toString(2) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(2) !== "0"){
|
if ((new Number(0)).toString(2) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(2) === "0"');
|
$ERROR('#3: (new Number(0)).toString(2) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(2) !== "-1"){
|
if ((new Number(-1)).toString(2) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(2) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(2) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(2) !== "1"){
|
if ((new Number(1)).toString(2) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(2) === "1"');
|
$ERROR('#5: (new Number(1)).toString(2) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(2) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(2) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(2) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(2) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(2) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(2) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(2) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(2) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(2) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(2) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(2) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(2) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 3
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(3) !== "0"){
|
if (Number.prototype.toString(3) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(3) === "0"');
|
$ERROR('#1: Number.prototype.toString(3) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(3) !== "0"){
|
if ((new Number()).toString(3) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(3) === "0"');
|
$ERROR('#2: (new Number()).toString(3) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(3) !== "0"){
|
if ((new Number(0)).toString(3) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(3) === "0"');
|
$ERROR('#3: (new Number(0)).toString(3) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(3) !== "-1"){
|
if ((new Number(-1)).toString(3) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(3) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(3) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(3) !== "1"){
|
if ((new Number(1)).toString(3) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(3) === "1"');
|
$ERROR('#5: (new Number(1)).toString(3) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(3) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(3) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(3) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(3) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(3) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(3) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(3) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(3) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(3) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(3) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(3) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(3) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 4
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(4) !== "0"){
|
if (Number.prototype.toString(4) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(4) === "0"');
|
$ERROR('#1: Number.prototype.toString(4) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(4) !== "0"){
|
if ((new Number()).toString(4) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(4) === "0"');
|
$ERROR('#2: (new Number()).toString(4) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(4) !== "0"){
|
if ((new Number(0)).toString(4) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(4) === "0"');
|
$ERROR('#3: (new Number(0)).toString(4) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(4) !== "-1"){
|
if ((new Number(-1)).toString(4) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(4) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(4) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(4) !== "1"){
|
if ((new Number(1)).toString(4) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(4) === "1"');
|
$ERROR('#5: (new Number(1)).toString(4) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(4) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(4) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(4) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(4) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(4) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(4) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(4) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(4) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(4) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(4) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(4) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(4) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 5
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(5) !== "0"){
|
if (Number.prototype.toString(5) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(5) === "0"');
|
$ERROR('#1: Number.prototype.toString(5) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(5) !== "0"){
|
if ((new Number()).toString(5) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(5) === "0"');
|
$ERROR('#2: (new Number()).toString(5) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(5) !== "0"){
|
if ((new Number(0)).toString(5) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(5) === "0"');
|
$ERROR('#3: (new Number(0)).toString(5) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(5) !== "-1"){
|
if ((new Number(-1)).toString(5) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(5) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(5) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(5) !== "1"){
|
if ((new Number(1)).toString(5) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(5) === "1"');
|
$ERROR('#5: (new Number(1)).toString(5) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(5) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(5) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(5) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(5) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(5) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(5) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(5) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(5) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(5) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(5) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(5) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(5) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 6
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(6) !== "0"){
|
if (Number.prototype.toString(6) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(6) === "0"');
|
$ERROR('#1: Number.prototype.toString(6) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(6) !== "0"){
|
if ((new Number()).toString(6) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(6) === "0"');
|
$ERROR('#2: (new Number()).toString(6) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(6) !== "0"){
|
if ((new Number(0)).toString(6) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(6) === "0"');
|
$ERROR('#3: (new Number(0)).toString(6) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(6) !== "-1"){
|
if ((new Number(-1)).toString(6) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(6) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(6) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(6) !== "1"){
|
if ((new Number(1)).toString(6) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(6) === "1"');
|
$ERROR('#5: (new Number(1)).toString(6) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(6) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(6) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(6) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(6) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(6) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(6) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(6) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(6) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(6) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(6) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(6) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(6) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 7
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(7) !== "0"){
|
if (Number.prototype.toString(7) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(7) === "0"');
|
$ERROR('#1: Number.prototype.toString(7) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(7) !== "0"){
|
if ((new Number()).toString(7) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(7) === "0"');
|
$ERROR('#2: (new Number()).toString(7) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(7) !== "0"){
|
if ((new Number(0)).toString(7) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(7) === "0"');
|
$ERROR('#3: (new Number(0)).toString(7) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(7) !== "-1"){
|
if ((new Number(-1)).toString(7) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(7) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(7) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(7) !== "1"){
|
if ((new Number(1)).toString(7) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(7) === "1"');
|
$ERROR('#5: (new Number(1)).toString(7) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(7) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(7) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(7) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(7) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(7) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(7) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(7) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(7) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(7) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(7) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(7) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(7) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 8
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(8) !== "0"){
|
if (Number.prototype.toString(8) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(8) === "0"');
|
$ERROR('#1: Number.prototype.toString(8) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(8) !== "0"){
|
if ((new Number()).toString(8) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(8) === "0"');
|
$ERROR('#2: (new Number()).toString(8) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(8) !== "0"){
|
if ((new Number(0)).toString(8) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(8) === "0"');
|
$ERROR('#3: (new Number(0)).toString(8) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(8) !== "-1"){
|
if ((new Number(-1)).toString(8) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(8) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(8) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(8) !== "1"){
|
if ((new Number(1)).toString(8) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(8) === "1"');
|
$ERROR('#5: (new Number(1)).toString(8) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(8) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(8) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(8) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(8) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(8) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(8) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(8) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(8) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(8) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(8) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(8) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(8) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 9
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(9) !== "0"){
|
if (Number.prototype.toString(9) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(9) === "0"');
|
$ERROR('#1: Number.prototype.toString(9) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(9) !== "0"){
|
if ((new Number()).toString(9) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(9) === "0"');
|
$ERROR('#2: (new Number()).toString(9) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(9) !== "0"){
|
if ((new Number(0)).toString(9) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(9) === "0"');
|
$ERROR('#3: (new Number(0)).toString(9) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(9) !== "-1"){
|
if ((new Number(-1)).toString(9) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(9) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(9) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(9) !== "1"){
|
if ((new Number(1)).toString(9) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(9) === "1"');
|
$ERROR('#5: (new Number(1)).toString(9) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(9) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(9) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(9) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(9) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(9) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(9) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(9) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(9) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(9) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(9) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(9) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(9) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 11
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(11) !== "0"){
|
if (Number.prototype.toString(11) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(11) === "0"');
|
$ERROR('#1: Number.prototype.toString(11) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(11) !== "0"){
|
if ((new Number()).toString(11) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(11) === "0"');
|
$ERROR('#2: (new Number()).toString(11) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(11) !== "0"){
|
if ((new Number(0)).toString(11) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(11) === "0"');
|
$ERROR('#3: (new Number(0)).toString(11) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(11) !== "-1"){
|
if ((new Number(-1)).toString(11) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(11) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(11) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(11) !== "1"){
|
if ((new Number(1)).toString(11) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(11) === "1"');
|
$ERROR('#5: (new Number(1)).toString(11) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(11) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(11) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(11) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(11) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(11) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(11) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(11) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(11) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(11) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(11) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(11) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(11) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 12
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(12) !== "0"){
|
if (Number.prototype.toString(12) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(12) === "0"');
|
$ERROR('#1: Number.prototype.toString(12) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(12) !== "0"){
|
if ((new Number()).toString(12) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(12) === "0"');
|
$ERROR('#2: (new Number()).toString(12) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(12) !== "0"){
|
if ((new Number(0)).toString(12) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(12) === "0"');
|
$ERROR('#3: (new Number(0)).toString(12) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(12) !== "-1"){
|
if ((new Number(-1)).toString(12) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(12) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(12) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(12) !== "1"){
|
if ((new Number(1)).toString(12) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(12) === "1"');
|
$ERROR('#5: (new Number(1)).toString(12) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(12) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(12) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(12) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(12) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(12) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(12) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(12) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(12) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(12) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(12) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(12) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(12) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 13
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(13) !== "0"){
|
if (Number.prototype.toString(13) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(13) === "0"');
|
$ERROR('#1: Number.prototype.toString(13) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(13) !== "0"){
|
if ((new Number()).toString(13) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(13) === "0"');
|
$ERROR('#2: (new Number()).toString(13) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(13) !== "0"){
|
if ((new Number(0)).toString(13) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(13) === "0"');
|
$ERROR('#3: (new Number(0)).toString(13) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(13) !== "-1"){
|
if ((new Number(-1)).toString(13) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(13) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(13) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(13) !== "1"){
|
if ((new Number(1)).toString(13) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(13) === "1"');
|
$ERROR('#5: (new Number(1)).toString(13) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(13) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(13) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(13) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(13) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(13) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(13) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(13) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(13) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(13) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(13) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(13) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(13) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 14
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(14) !== "0"){
|
if (Number.prototype.toString(14) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(14) === "0"');
|
$ERROR('#1: Number.prototype.toString(14) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(14) !== "0"){
|
if ((new Number()).toString(14) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(14) === "0"');
|
$ERROR('#2: (new Number()).toString(14) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(14) !== "0"){
|
if ((new Number(0)).toString(14) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(14) === "0"');
|
$ERROR('#3: (new Number(0)).toString(14) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(14) !== "-1"){
|
if ((new Number(-1)).toString(14) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(14) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(14) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(14) !== "1"){
|
if ((new Number(1)).toString(14) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(14) === "1"');
|
$ERROR('#5: (new Number(1)).toString(14) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(14) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(14) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(14) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(14) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(14) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(14) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(14) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(14) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(14) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(14) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(14) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(14) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 15
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(15) !== "0"){
|
if (Number.prototype.toString(15) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(15) === "0"');
|
$ERROR('#1: Number.prototype.toString(15) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(15) !== "0"){
|
if ((new Number()).toString(15) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(15) === "0"');
|
$ERROR('#2: (new Number()).toString(15) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(15) !== "0"){
|
if ((new Number(0)).toString(15) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(15) === "0"');
|
$ERROR('#3: (new Number(0)).toString(15) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(15) !== "-1"){
|
if ((new Number(-1)).toString(15) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(15) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(15) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(15) !== "1"){
|
if ((new Number(1)).toString(15) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(15) === "1"');
|
$ERROR('#5: (new Number(1)).toString(15) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(15) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(15) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(15) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(15) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(15) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(15) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(15) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(15) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(15) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(15) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(15) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(15) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 16
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(16) !== "0"){
|
if (Number.prototype.toString(16) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(16) === "0"');
|
$ERROR('#1: Number.prototype.toString(16) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(16) !== "0"){
|
if ((new Number()).toString(16) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(16) === "0"');
|
$ERROR('#2: (new Number()).toString(16) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(16) !== "0"){
|
if ((new Number(0)).toString(16) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(16) === "0"');
|
$ERROR('#3: (new Number(0)).toString(16) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(16) !== "-1"){
|
if ((new Number(-1)).toString(16) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(16) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(16) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(16) !== "1"){
|
if ((new Number(1)).toString(16) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(16) === "1"');
|
$ERROR('#5: (new Number(1)).toString(16) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(16) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(16) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(16) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(16) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(16) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(16) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(16) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(16) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(16) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(16) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(16) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(16) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 17
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(17) !== "0"){
|
if (Number.prototype.toString(17) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(17) === "0"');
|
$ERROR('#1: Number.prototype.toString(17) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(17) !== "0"){
|
if ((new Number()).toString(17) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(17) === "0"');
|
$ERROR('#2: (new Number()).toString(17) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(17) !== "0"){
|
if ((new Number(0)).toString(17) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(17) === "0"');
|
$ERROR('#3: (new Number(0)).toString(17) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(17) !== "-1"){
|
if ((new Number(-1)).toString(17) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(17) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(17) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(17) !== "1"){
|
if ((new Number(1)).toString(17) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(17) === "1"');
|
$ERROR('#5: (new Number(1)).toString(17) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(17) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(17) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(17) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(17) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(17) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(17) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(17) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(17) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(17) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(17) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(17) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(17) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 18
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(18) !== "0"){
|
if (Number.prototype.toString(18) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(18) === "0"');
|
$ERROR('#1: Number.prototype.toString(18) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(18) !== "0"){
|
if ((new Number()).toString(18) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(18) === "0"');
|
$ERROR('#2: (new Number()).toString(18) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(18) !== "0"){
|
if ((new Number(0)).toString(18) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(18) === "0"');
|
$ERROR('#3: (new Number(0)).toString(18) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(18) !== "-1"){
|
if ((new Number(-1)).toString(18) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(18) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(18) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(18) !== "1"){
|
if ((new Number(1)).toString(18) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(18) === "1"');
|
$ERROR('#5: (new Number(1)).toString(18) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(18) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(18) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(18) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(18) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(18) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(18) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(18) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(18) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(18) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(18) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(18) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(18) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 19
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(19) !== "0"){
|
if (Number.prototype.toString(19) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(19) === "0"');
|
$ERROR('#1: Number.prototype.toString(19) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(19) !== "0"){
|
if ((new Number()).toString(19) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(19) === "0"');
|
$ERROR('#2: (new Number()).toString(19) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(19) !== "0"){
|
if ((new Number(0)).toString(19) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(19) === "0"');
|
$ERROR('#3: (new Number(0)).toString(19) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(19) !== "-1"){
|
if ((new Number(-1)).toString(19) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(19) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(19) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(19) !== "1"){
|
if ((new Number(1)).toString(19) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(19) === "1"');
|
$ERROR('#5: (new Number(1)).toString(19) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(19) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(19) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(19) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(19) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(19) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(19) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(19) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(19) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(19) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(19) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(19) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(19) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 20
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(20) !== "0"){
|
if (Number.prototype.toString(20) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(20) === "0"');
|
$ERROR('#1: Number.prototype.toString(20) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(20) !== "0"){
|
if ((new Number()).toString(20) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(20) === "0"');
|
$ERROR('#2: (new Number()).toString(20) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(20) !== "0"){
|
if ((new Number(0)).toString(20) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(20) === "0"');
|
$ERROR('#3: (new Number(0)).toString(20) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(20) !== "-1"){
|
if ((new Number(-1)).toString(20) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(20) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(20) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(20) !== "1"){
|
if ((new Number(1)).toString(20) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(20) === "1"');
|
$ERROR('#5: (new Number(1)).toString(20) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(20) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(20) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(20) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(20) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(20) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(20) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(20) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(20) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(20) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(20) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(20) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(20) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 21
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(21) !== "0"){
|
if (Number.prototype.toString(21) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(21) === "0"');
|
$ERROR('#1: Number.prototype.toString(21) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(21) !== "0"){
|
if ((new Number()).toString(21) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(21) === "0"');
|
$ERROR('#2: (new Number()).toString(21) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(21) !== "0"){
|
if ((new Number(0)).toString(21) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(21) === "0"');
|
$ERROR('#3: (new Number(0)).toString(21) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(21) !== "-1"){
|
if ((new Number(-1)).toString(21) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(21) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(21) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(21) !== "1"){
|
if ((new Number(1)).toString(21) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(21) === "1"');
|
$ERROR('#5: (new Number(1)).toString(21) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(21) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(21) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(21) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(21) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(21) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(21) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(21) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(21) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(21) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(21) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(21) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(21) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 22
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(22) !== "0"){
|
if (Number.prototype.toString(22) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(22) === "0"');
|
$ERROR('#1: Number.prototype.toString(22) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(22) !== "0"){
|
if ((new Number()).toString(22) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(22) === "0"');
|
$ERROR('#2: (new Number()).toString(22) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(22) !== "0"){
|
if ((new Number(0)).toString(22) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(22) === "0"');
|
$ERROR('#3: (new Number(0)).toString(22) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(22) !== "-1"){
|
if ((new Number(-1)).toString(22) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(22) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(22) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(22) !== "1"){
|
if ((new Number(1)).toString(22) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(22) === "1"');
|
$ERROR('#5: (new Number(1)).toString(22) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(22) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(22) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(22) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(22) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(22) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(22) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(22) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(22) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(22) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(22) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(22) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(22) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 23
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(23) !== "0"){
|
if (Number.prototype.toString(23) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(23) === "0"');
|
$ERROR('#1: Number.prototype.toString(23) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(23) !== "0"){
|
if ((new Number()).toString(23) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(23) === "0"');
|
$ERROR('#2: (new Number()).toString(23) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(23) !== "0"){
|
if ((new Number(0)).toString(23) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(23) === "0"');
|
$ERROR('#3: (new Number(0)).toString(23) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(23) !== "-1"){
|
if ((new Number(-1)).toString(23) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(23) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(23) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(23) !== "1"){
|
if ((new Number(1)).toString(23) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(23) === "1"');
|
$ERROR('#5: (new Number(1)).toString(23) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(23) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(23) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(23) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(23) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(23) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(23) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(23) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(23) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(23) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(23) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(23) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(23) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 24
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(24) !== "0"){
|
if (Number.prototype.toString(24) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(24) === "0"');
|
$ERROR('#1: Number.prototype.toString(24) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(24) !== "0"){
|
if ((new Number()).toString(24) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(24) === "0"');
|
$ERROR('#2: (new Number()).toString(24) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(24) !== "0"){
|
if ((new Number(0)).toString(24) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(24) === "0"');
|
$ERROR('#3: (new Number(0)).toString(24) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(24) !== "-1"){
|
if ((new Number(-1)).toString(24) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(24) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(24) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(24) !== "1"){
|
if ((new Number(1)).toString(24) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(24) === "1"');
|
$ERROR('#5: (new Number(1)).toString(24) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(24) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(24) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(24) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(24) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(24) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(24) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(24) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(24) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(24) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(24) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(24) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(24) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 25
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(25) !== "0"){
|
if (Number.prototype.toString(25) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(25) === "0"');
|
$ERROR('#1: Number.prototype.toString(25) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(25) !== "0"){
|
if ((new Number()).toString(25) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(25) === "0"');
|
$ERROR('#2: (new Number()).toString(25) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(25) !== "0"){
|
if ((new Number(0)).toString(25) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(25) === "0"');
|
$ERROR('#3: (new Number(0)).toString(25) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(25) !== "-1"){
|
if ((new Number(-1)).toString(25) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(25) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(25) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(25) !== "1"){
|
if ((new Number(1)).toString(25) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(25) === "1"');
|
$ERROR('#5: (new Number(1)).toString(25) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(25) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(25) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(25) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(25) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(25) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(25) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(25) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(25) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(25) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(25) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(25) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(25) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 26
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(26) !== "0"){
|
if (Number.prototype.toString(26) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(26) === "0"');
|
$ERROR('#1: Number.prototype.toString(26) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(26) !== "0"){
|
if ((new Number()).toString(26) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(26) === "0"');
|
$ERROR('#2: (new Number()).toString(26) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(26) !== "0"){
|
if ((new Number(0)).toString(26) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(26) === "0"');
|
$ERROR('#3: (new Number(0)).toString(26) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(26) !== "-1"){
|
if ((new Number(-1)).toString(26) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(26) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(26) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(26) !== "1"){
|
if ((new Number(1)).toString(26) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(26) === "1"');
|
$ERROR('#5: (new Number(1)).toString(26) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(26) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(26) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(26) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(26) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(26) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(26) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(26) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(26) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(26) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(26) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(26) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(26) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 27
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(27) !== "0"){
|
if (Number.prototype.toString(27) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(27) === "0"');
|
$ERROR('#1: Number.prototype.toString(27) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(27) !== "0"){
|
if ((new Number()).toString(27) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(27) === "0"');
|
$ERROR('#2: (new Number()).toString(27) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(27) !== "0"){
|
if ((new Number(0)).toString(27) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(27) === "0"');
|
$ERROR('#3: (new Number(0)).toString(27) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(27) !== "-1"){
|
if ((new Number(-1)).toString(27) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(27) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(27) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(27) !== "1"){
|
if ((new Number(1)).toString(27) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(27) === "1"');
|
$ERROR('#5: (new Number(1)).toString(27) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(27) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(27) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(27) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(27) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(27) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(27) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(27) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(27) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(27) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(27) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(27) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(27) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 28
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(28) !== "0"){
|
if (Number.prototype.toString(28) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(28) === "0"');
|
$ERROR('#1: Number.prototype.toString(28) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(28) !== "0"){
|
if ((new Number()).toString(28) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(28) === "0"');
|
$ERROR('#2: (new Number()).toString(28) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(28) !== "0"){
|
if ((new Number(0)).toString(28) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(28) === "0"');
|
$ERROR('#3: (new Number(0)).toString(28) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(28) !== "-1"){
|
if ((new Number(-1)).toString(28) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(28) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(28) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(28) !== "1"){
|
if ((new Number(1)).toString(28) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(28) === "1"');
|
$ERROR('#5: (new Number(1)).toString(28) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(28) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(28) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(28) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(28) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(28) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(28) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(28) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(28) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(28) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(28) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(28) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(28) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 29
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(29) !== "0"){
|
if (Number.prototype.toString(29) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(29) === "0"');
|
$ERROR('#1: Number.prototype.toString(29) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(29) !== "0"){
|
if ((new Number()).toString(29) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(29) === "0"');
|
$ERROR('#2: (new Number()).toString(29) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(29) !== "0"){
|
if ((new Number(0)).toString(29) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(29) === "0"');
|
$ERROR('#3: (new Number(0)).toString(29) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(29) !== "-1"){
|
if ((new Number(-1)).toString(29) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(29) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(29) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(29) !== "1"){
|
if ((new Number(1)).toString(29) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(29) === "1"');
|
$ERROR('#5: (new Number(1)).toString(29) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(29) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(29) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(29) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(29) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(29) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(29) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(29) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(29) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(29) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(29) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(29) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(29) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 30
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(30) !== "0"){
|
if (Number.prototype.toString(30) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(30) === "0"');
|
$ERROR('#1: Number.prototype.toString(30) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(30) !== "0"){
|
if ((new Number()).toString(30) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(30) === "0"');
|
$ERROR('#2: (new Number()).toString(30) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(30) !== "0"){
|
if ((new Number(0)).toString(30) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(30) === "0"');
|
$ERROR('#3: (new Number(0)).toString(30) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(30) !== "-1"){
|
if ((new Number(-1)).toString(30) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(30) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(30) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(30) !== "1"){
|
if ((new Number(1)).toString(30) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(30) === "1"');
|
$ERROR('#5: (new Number(1)).toString(30) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(30) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(30) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(30) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(30) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(30) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(30) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(30) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(30) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(30) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(30) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(30) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(30) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 31
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(31) !== "0"){
|
if (Number.prototype.toString(31) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(31) === "0"');
|
$ERROR('#1: Number.prototype.toString(31) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(31) !== "0"){
|
if ((new Number()).toString(31) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(31) === "0"');
|
$ERROR('#2: (new Number()).toString(31) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(31) !== "0"){
|
if ((new Number(0)).toString(31) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(31) === "0"');
|
$ERROR('#3: (new Number(0)).toString(31) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(31) !== "-1"){
|
if ((new Number(-1)).toString(31) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(31) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(31) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(31) !== "1"){
|
if ((new Number(1)).toString(31) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(31) === "1"');
|
$ERROR('#5: (new Number(1)).toString(31) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(31) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(31) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(31) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(31) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(31) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(31) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(31) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(31) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(31) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(31) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(31) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(31) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 32
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(32) !== "0"){
|
if (Number.prototype.toString(32) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(32) === "0"');
|
$ERROR('#1: Number.prototype.toString(32) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(32) !== "0"){
|
if ((new Number()).toString(32) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(32) === "0"');
|
$ERROR('#2: (new Number()).toString(32) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(32) !== "0"){
|
if ((new Number(0)).toString(32) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(32) === "0"');
|
$ERROR('#3: (new Number(0)).toString(32) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(32) !== "-1"){
|
if ((new Number(-1)).toString(32) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(32) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(32) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(32) !== "1"){
|
if ((new Number(1)).toString(32) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(32) === "1"');
|
$ERROR('#5: (new Number(1)).toString(32) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(32) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(32) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(32) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(32) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(32) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(32) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(32) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(32) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(32) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(32) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(32) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(32) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 33
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(33) !== "0"){
|
if (Number.prototype.toString(33) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(33) === "0"');
|
$ERROR('#1: Number.prototype.toString(33) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(33) !== "0"){
|
if ((new Number()).toString(33) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(33) === "0"');
|
$ERROR('#2: (new Number()).toString(33) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(33) !== "0"){
|
if ((new Number(0)).toString(33) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(33) === "0"');
|
$ERROR('#3: (new Number(0)).toString(33) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(33) !== "-1"){
|
if ((new Number(-1)).toString(33) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(33) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(33) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(33) !== "1"){
|
if ((new Number(1)).toString(33) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(33) === "1"');
|
$ERROR('#5: (new Number(1)).toString(33) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(33) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(33) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(33) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(33) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(33) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(33) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(33) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(33) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(33) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(33) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(33) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(33) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 34
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(34) !== "0"){
|
if (Number.prototype.toString(34) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(34) === "0"');
|
$ERROR('#1: Number.prototype.toString(34) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(34) !== "0"){
|
if ((new Number()).toString(34) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(34) === "0"');
|
$ERROR('#2: (new Number()).toString(34) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(34) !== "0"){
|
if ((new Number(0)).toString(34) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(34) === "0"');
|
$ERROR('#3: (new Number(0)).toString(34) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(34) !== "-1"){
|
if ((new Number(-1)).toString(34) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(34) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(34) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(34) !== "1"){
|
if ((new Number(1)).toString(34) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(34) === "1"');
|
$ERROR('#5: (new Number(1)).toString(34) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(34) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(34) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(34) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(34) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(34) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(34) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(34) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(34) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(34) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(34) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(34) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(34) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
@ -10,41 +10,41 @@ description: radix is 35
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(Number.prototype.toString(35) !== "0"){
|
if (Number.prototype.toString(35) !== "0") {
|
||||||
$ERROR('#1: Number.prototype.toString(35) === "0"');
|
$ERROR('#1: Number.prototype.toString(35) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if((new Number()).toString(35) !== "0"){
|
if ((new Number()).toString(35) !== "0") {
|
||||||
$ERROR('#2: (new Number()).toString(35) === "0"');
|
$ERROR('#2: (new Number()).toString(35) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if((new Number(0)).toString(35) !== "0"){
|
if ((new Number(0)).toString(35) !== "0") {
|
||||||
$ERROR('#3: (new Number(0)).toString(35) === "0"');
|
$ERROR('#3: (new Number(0)).toString(35) === "0"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
if((new Number(-1)).toString(35) !== "-1"){
|
if ((new Number(-1)).toString(35) !== "-1") {
|
||||||
$ERROR('#4: (new Number(-1)).toString(35) === "-1"');
|
$ERROR('#4: (new Number(-1)).toString(35) === "-1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
//CHECK#5
|
||||||
if((new Number(1)).toString(35) !== "1"){
|
if ((new Number(1)).toString(35) !== "1") {
|
||||||
$ERROR('#5: (new Number(1)).toString(35) === "1"');
|
$ERROR('#5: (new Number(1)).toString(35) === "1"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#6
|
//CHECK#6
|
||||||
if((new Number(Number.NaN)).toString(35) !== "NaN"){
|
if ((new Number(Number.NaN)).toString(35) !== "NaN") {
|
||||||
$ERROR('#6: (new Number(Number.NaN)).toString(35) === "NaN"');
|
$ERROR('#6: (new Number(Number.NaN)).toString(35) === "NaN"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#7
|
//CHECK#7
|
||||||
if((new Number(Number.POSITIVE_INFINITY)).toString(35) !== "Infinity"){
|
if ((new Number(Number.POSITIVE_INFINITY)).toString(35) !== "Infinity") {
|
||||||
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(35) === "Infinity"');
|
$ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(35) === "Infinity"');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#8
|
//CHECK#8
|
||||||
if((new Number(Number.NEGATIVE_INFINITY)).toString(35) !== "-Infinity"){
|
if ((new Number(Number.NEGATIVE_INFINITY)).toString(35) !== "-Infinity") {
|
||||||
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(35) === "-Infinity"');
|
$ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(35) === "-Infinity"');
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user