mirror of https://github.com/tc39/test262.git
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/parseFloat
This commit is contained in:
parent
ecf835778d
commit
ad15eca476
|
@ -9,29 +9,29 @@ description: Checking for number primitive
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat(-1.1) !== parseFloat("-1.1")) {
|
||||
$ERROR('#1: parseFloat(-1.1) === parseFloat("-1.1"). Actual: ' + (parseFloat(-1.1)));
|
||||
throw new Test262Error('#1: parseFloat(-1.1) === parseFloat("-1.1"). Actual: ' + (parseFloat(-1.1)));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat(Infinity) !== parseFloat("Infinity")) {
|
||||
$ERROR('#2: parseFloat(Infinity) === parseFloat("Infinity"). Actual: ' + (parseFloat(Infinity)));
|
||||
throw new Test262Error('#2: parseFloat(Infinity) === parseFloat("Infinity"). Actual: ' + (parseFloat(Infinity)));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (String(parseFloat(NaN)) !== "NaN") {
|
||||
$ERROR('#3: String(parseFloat(NaN)) === "NaN". Actual: ' + (String(parseFloat(NaN))));
|
||||
throw new Test262Error('#3: String(parseFloat(NaN)) === "NaN". Actual: ' + (String(parseFloat(NaN))));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat(.01e+2) !== parseFloat(".01e+2")) {
|
||||
$ERROR('#4: parseFloat(.01e+2) === parseFloat(".01e+2"). Actual: ' + (parseFloat(.01e+2)));
|
||||
throw new Test262Error('#4: parseFloat(.01e+2) === parseFloat(".01e+2"). Actual: ' + (parseFloat(.01e+2)));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat(-0) !== 0) {
|
||||
$ERROR('#5: parseFloat(-0) === 0. Actual: ' + (parseFloat(-0)));
|
||||
throw new Test262Error('#5: parseFloat(-0) === 0. Actual: ' + (parseFloat(-0)));
|
||||
} else {
|
||||
if (1 / parseFloat(-0) !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#5: parseFloat(-0) === +0. Actual: ' + (parseFloat(-0)));
|
||||
throw new Test262Error('#5: parseFloat(-0) === +0. Actual: ' + (parseFloat(-0)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,20 +9,20 @@ description: Checking for Number object
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat(new Number(-1.1)) !== parseFloat("-1.1")) {
|
||||
$ERROR('#1: parseFloat(new Number(-1.1)) === parseFloat("-1.1"). Actual: ' + (parseFloat(new Number(-1.1))));
|
||||
throw new Test262Error('#1: parseFloat(new Number(-1.1)) === parseFloat("-1.1"). Actual: ' + (parseFloat(new Number(-1.1))));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat(new Number(Infinity)) !== parseFloat("Infinity")) {
|
||||
$ERROR('#2: parseFloat(new Number(Infinity)) === parseFloat("Infinity"). Actual: ' + (parseFloat(new Number(Infinity))));
|
||||
throw new Test262Error('#2: parseFloat(new Number(Infinity)) === parseFloat("Infinity"). Actual: ' + (parseFloat(new Number(Infinity))));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (String(parseFloat(new Number(NaN))) !== "NaN") {
|
||||
$ERROR('#3: String(parseFloat(new Number(NaN))) === "NaN". Actual: ' + (String(parseFloat(new Number(NaN)))));
|
||||
throw new Test262Error('#3: String(parseFloat(new Number(NaN))) === "NaN". Actual: ' + (String(parseFloat(new Number(NaN)))));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat(new Number(.01e+2)) !== parseFloat(".01e+2")) {
|
||||
$ERROR('#4: parseFloat(new Number(.01e+2)) === parseFloat(".01e+2"). Actual: ' + (parseFloat(new Number(.01e+2))));
|
||||
throw new Test262Error('#4: parseFloat(new Number(.01e+2)) === parseFloat(".01e+2"). Actual: ' + (parseFloat(new Number(.01e+2))));
|
||||
}
|
||||
|
|
|
@ -9,25 +9,25 @@ description: Checking for String object
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat(new String("-1.1")) !== parseFloat("-1.1")) {
|
||||
$ERROR('#1: parseFloat(new String("-1.1")) === parseFloat("-1.1"). Actual: ' + (parseFloat(new String("-1.1"))));
|
||||
throw new Test262Error('#1: parseFloat(new String("-1.1")) === parseFloat("-1.1"). Actual: ' + (parseFloat(new String("-1.1"))));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat(new String("Infinity")) !== parseFloat("Infinity")) {
|
||||
$ERROR('#2: parseFloat(new String("Infinity")) === parseFloat("Infinity"). Actual: ' + (parseFloat(new String("Infinity"))));
|
||||
throw new Test262Error('#2: parseFloat(new String("Infinity")) === parseFloat("Infinity"). Actual: ' + (parseFloat(new String("Infinity"))));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (String(parseFloat(new String("NaN"))) !== "NaN") {
|
||||
$ERROR('#3: String(parseFloat(new String("NaN"))) === "NaN". Actual: ' + (String(parseFloat(new String("NaN")))));
|
||||
throw new Test262Error('#3: String(parseFloat(new String("NaN"))) === "NaN". Actual: ' + (String(parseFloat(new String("NaN")))));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat(new String(".01e+2")) !== parseFloat(".01e+2")) {
|
||||
$ERROR('#4: parseFloat(new String(".01e+2")) === parseFloat(".01e+2"). Actual: ' + (parseFloat(new String(".01e+2"))));
|
||||
throw new Test262Error('#4: parseFloat(new String(".01e+2")) === parseFloat(".01e+2"). Actual: ' + (parseFloat(new String(".01e+2"))));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (String(parseFloat(new String("false"))) !== "NaN") {
|
||||
$ERROR('#5: String(parseFloat(new String("false"))) === "NaN". Actual: ' + (String(parseFloat(new String("false")))));
|
||||
throw new Test262Error('#5: String(parseFloat(new String("false"))) === "NaN". Actual: ' + (String(parseFloat(new String("false")))));
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (parseFloat(object) !== 0) {
|
||||
$ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; parseFloat(object) === 0. Actual: ' + (parseFloat(object)));
|
||||
throw new Test262Error('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; parseFloat(object) === 0. Actual: ' + (parseFloat(object)));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
@ -38,7 +38,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (parseFloat(object) !== 1) {
|
||||
$ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
throw new Test262Error('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
|
@ -52,14 +52,14 @@ try {
|
|||
}
|
||||
};
|
||||
if (parseFloat(object) !== 1) {
|
||||
$ERROR('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
throw new Test262Error('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
if (e === "error") {
|
||||
$ERROR('#4.2: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; parseFloat(object) not throw "error"');
|
||||
throw new Test262Error('#4.2: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; parseFloat(object) not throw "error"');
|
||||
} else {
|
||||
$ERROR('#4.3: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; parseFloat(object) not throw Error. Actual: ' + (e));
|
||||
throw new Test262Error('#4.3: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; parseFloat(object) not throw Error. Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (parseFloat(object) !== 1) {
|
||||
$ERROR('#5: var object = {toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
throw new Test262Error('#5: var object = {toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
|
@ -83,7 +83,7 @@ var object = {
|
|||
}
|
||||
}
|
||||
if (parseFloat(object) !== 1) {
|
||||
$ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
throw new Test262Error('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
|
@ -97,11 +97,11 @@ try {
|
|||
}
|
||||
};
|
||||
parseFloat(object);
|
||||
$ERROR('#7.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; parseFloat(object) throw "error". Actual: ' + (parseFloat(object)));
|
||||
throw new Test262Error('#7.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; parseFloat(object) throw "error". Actual: ' + (parseFloat(object)));
|
||||
}
|
||||
catch (e) {
|
||||
if (e !== "error") {
|
||||
$ERROR('#7.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; parseFloat(object) throw "error". Actual: ' + (e));
|
||||
throw new Test262Error('#7.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; parseFloat(object) throw "error". Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,10 +116,10 @@ try {
|
|||
}
|
||||
};
|
||||
parseFloat(object);
|
||||
$ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseFloat(object) throw TypeError. Actual: ' + (parseFloat(object)));
|
||||
throw new Test262Error('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseFloat(object) throw TypeError. Actual: ' + (parseFloat(object)));
|
||||
}
|
||||
catch (e) {
|
||||
if ((e instanceof TypeError) !== true) {
|
||||
$ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseFloat(object) throw TypeError. Actual: ' + (e));
|
||||
throw new Test262Error('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseFloat(object) throw TypeError. Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,27 +9,27 @@ description: "StrWhiteSpaceChar :: TAB (U+0009)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u00091.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u00091.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00091.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u00091.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00091.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u0009\u0009-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u0009\\u0009-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u0009\u0009-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u0009\\u0009-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u0009\u0009-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat(" 1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#3: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
throw new Test262Error('#3: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat(" 1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#4: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
throw new Test262Error('#4: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat(" \u0009 \u0009-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#5: parseFloat(" \\u0009 \\u0009-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat(" \u0009 \u0009-1.1")));
|
||||
throw new Test262Error('#5: parseFloat(" \\u0009 \\u0009-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat(" \u0009 \u0009-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
|
|
|
@ -17,16 +17,16 @@ for (var index = 0; index < uspU.length; index++) {
|
|||
var result = true;
|
||||
n = false;
|
||||
if (parseFloat(uspU[index] + "1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1.' + uspS[index] + ' ');
|
||||
throw new Test262Error('#1.' + uspS[index] + ' ');
|
||||
result = false;
|
||||
}
|
||||
if (parseFloat(uspU[index] + uspU[index] + uspU[index] + "1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#2.' + uspS[index] + ' ');
|
||||
throw new Test262Error('#2.' + uspS[index] + ' ');
|
||||
result = false;
|
||||
}
|
||||
n = parseFloat(uspU[index]);
|
||||
if (!(n !== n)) {
|
||||
$ERROR('#3.' + uspS[index] + ' ');
|
||||
throw new Test262Error('#3.' + uspS[index] + ' ');
|
||||
result = false;
|
||||
}
|
||||
if (result !== true) {
|
||||
|
@ -36,5 +36,5 @@ for (var index = 0; index < uspU.length; index++) {
|
|||
}
|
||||
|
||||
if (errorCount > 0) {
|
||||
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
||||
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count);
|
||||
}
|
||||
|
|
|
@ -9,27 +9,27 @@ description: "StrWhiteSpaceChar :: SP (U+0020)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u00201.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u00201.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00201.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u00201.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00201.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u0020\u0020-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u0020\\u0020-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u0020\u0020-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u0020\\u0020-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u0020\u0020-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat(" 1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#3: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
throw new Test262Error('#3: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat(" 1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#4: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
throw new Test262Error('#4: parseFloat(" 1.1") === parseFloat("1.1"). Actual: ' + (parseFloat(" 1.1")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat(" \u0020 \u0020-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#5: parseFloat(" \\u0020 \\u0020-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat(" \u0020 \u0020-1.1")));
|
||||
throw new Test262Error('#5: parseFloat(" \\u0020 \\u0020-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat(" \u0020 \u0020-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
|
|
|
@ -9,12 +9,12 @@ description: "StrWhiteSpaceChar :: NBSB (U+00A0)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u00A01.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u00A01.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00A01.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u00A01.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u00A01.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u00A0\u00A0-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u00A0\\u00A0-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u00A0\u00A0-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u00A0\\u00A0-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u00A0\u00A0-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
|
|
@ -9,12 +9,12 @@ description: "StrWhiteSpaceChar :: FF (U+000C)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u000C1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u000C1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000C1.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u000C1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000C1.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u000C\u000C-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u000C\\u000C-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000C\u000C-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u000C\\u000C-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000C\u000C-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
|
|
@ -9,12 +9,12 @@ description: "StrWhiteSpaceChar :: VT (U+000B)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u000B1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u000B1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000B1.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u000B1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000B1.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u000B\u000B-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u000B\\u000B-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000B\u000B-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u000B\\u000B-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000B\u000B-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
|
|
@ -9,12 +9,12 @@ description: "StrWhiteSpaceChar :: CR (U+000D)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u000D1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u000D1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000D1.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u000D1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000D1.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u000D\u000D-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u000D\\u000D-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000D\u000D-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u000D\\u000D-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000D\u000D-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
|
|
@ -9,12 +9,12 @@ description: "StrWhiteSpaceChar :: LF (U+000A)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u000A1.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u000A1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000A1.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u000A1.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u000A1.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u000A\u000A-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u000A\\u000A-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000A\u000A-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u000A\\u000A-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u000A\u000A-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
|
|
@ -9,12 +9,12 @@ description: "StrWhiteSpaceChar :: LS (U+2028)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u20281.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u20281.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u20281.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u20281.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u20281.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u2028\u2028-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u2028\\u2028-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u2028\u2028-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u2028\\u2028-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u2028\u2028-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
|
|
@ -9,12 +9,12 @@ description: "StrWhiteSpaceChar :: PS (U+2029)"
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("\u20291.1") !== parseFloat("1.1")) {
|
||||
$ERROR('#1: parseFloat("\\u20291.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u20291.1")));
|
||||
throw new Test262Error('#1: parseFloat("\\u20291.1") === parseFloat("1.1"). Actual: ' + (parseFloat("\u20291.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("\u2029\u2029-1.1") !== parseFloat("-1.1")) {
|
||||
$ERROR('#2: parseFloat("\\u2029\\u2029-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u2029\u2029-1.1")));
|
||||
throw new Test262Error('#2: parseFloat("\\u2029\\u2029-1.1") === parseFloat("-1.1"). Actual: ' + (parseFloat("\u2029\u2029-1.1")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
|
|
@ -11,45 +11,45 @@ description: Some wrong number
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("0x") !== 0) {
|
||||
$ERROR('#1: parseFloat("0x") === 0. Actual: ' + (parseFloat("0x")));
|
||||
throw new Test262Error('#1: parseFloat("0x") === 0. Actual: ' + (parseFloat("0x")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("11x") !== 11) {
|
||||
$ERROR('#2: parseFloat("11x") === 11. Actual: ' + (parseFloat("11x")));
|
||||
throw new Test262Error('#2: parseFloat("11x") === 11. Actual: ' + (parseFloat("11x")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("11s1") !== 11) {
|
||||
$ERROR('#3: parseFloat("11s1") === 11. Actual: ' + (parseFloat("11s1")));
|
||||
throw new Test262Error('#3: parseFloat("11s1") === 11. Actual: ' + (parseFloat("11s1")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat("11.s1") !== 11) {
|
||||
$ERROR('#4: parseFloat("11.s1") === 11. Actual: ' + (parseFloat("11.s1")));
|
||||
throw new Test262Error('#4: parseFloat("11.s1") === 11. Actual: ' + (parseFloat("11.s1")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat(".0s1") !== 0) {
|
||||
$ERROR('#5: parseFloat(".0s1") === 0. Actual: ' + (parseFloat(".0s1")));
|
||||
throw new Test262Error('#5: parseFloat(".0s1") === 0. Actual: ' + (parseFloat(".0s1")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
if (parseFloat("1.s1") !== 1) {
|
||||
$ERROR('#6: parseFloat("1.s1") === 1. Actual: ' + (parseFloat("1.s1")));
|
||||
throw new Test262Error('#6: parseFloat("1.s1") === 1. Actual: ' + (parseFloat("1.s1")));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
if (parseFloat("1..1") !== 1) {
|
||||
$ERROR('#7: parseFloat("1..1") === 1. Actual: ' + (parseFloat("1..1")));
|
||||
throw new Test262Error('#7: parseFloat("1..1") === 1. Actual: ' + (parseFloat("1..1")));
|
||||
}
|
||||
|
||||
//CHECK#8
|
||||
if (parseFloat("0.1.1") !== 0.1) {
|
||||
$ERROR('#8: parseFloat("0.1.1") === 0.1. Actual: ' + (parseFloat("0.1.1")));
|
||||
throw new Test262Error('#8: parseFloat("0.1.1") === 0.1. Actual: ' + (parseFloat("0.1.1")));
|
||||
}
|
||||
|
||||
//CHECK#9
|
||||
if (parseFloat("0. 1") !== 0) {
|
||||
$ERROR('#9: parseFloat("0. 1") === 0. Actual: ' + (parseFloat("0. 1")));
|
||||
throw new Test262Error('#9: parseFloat("0. 1") === 0. Actual: ' + (parseFloat("0. 1")));
|
||||
}
|
||||
|
|
|
@ -11,25 +11,25 @@ description: With ExponentIndicator
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("1ex") !== 1) {
|
||||
$ERROR('#1: parseFloat("1ex") === 1. Actual: ' + (parseFloat("1ex")));
|
||||
throw new Test262Error('#1: parseFloat("1ex") === 1. Actual: ' + (parseFloat("1ex")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("1e-x") !== 1) {
|
||||
$ERROR('#2: parseFloat("1e-x") === 1. Actual: ' + (parseFloat("1e-x")));
|
||||
throw new Test262Error('#2: parseFloat("1e-x") === 1. Actual: ' + (parseFloat("1e-x")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("1e1x") !== 10) {
|
||||
$ERROR('#3: parseFloat("1e1x") === 10. Actual: ' + (parseFloat("1e1x")));
|
||||
throw new Test262Error('#3: parseFloat("1e1x") === 10. Actual: ' + (parseFloat("1e1x")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat("1e-1x") !== 0.1) {
|
||||
$ERROR('#4: parseFloat("1e-1x") === 0.1. Actual: ' + (parseFloat("1e-1x")));
|
||||
throw new Test262Error('#4: parseFloat("1e-1x") === 0.1. Actual: ' + (parseFloat("1e-1x")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat("0.1e-1x") !== 0.01) {
|
||||
$ERROR('#5: parseFloat("0.1e-1x") === 0.01. Actual: ' + (parseFloat("0.1e-1x")));
|
||||
throw new Test262Error('#5: parseFloat("0.1e-1x") === 0.01. Actual: ' + (parseFloat("0.1e-1x")));
|
||||
}
|
||||
|
|
|
@ -11,80 +11,80 @@ description: StrDecimalLiteral not contain HexIntegerLiteral
|
|||
|
||||
//CHECK#0
|
||||
if (parseFloat("0x0") !== 0) {
|
||||
$ERROR('#0: parseFloat("0x0") === 0. Actual: ' + (parseFloat("0x0")));
|
||||
throw new Test262Error('#0: parseFloat("0x0") === 0. Actual: ' + (parseFloat("0x0")));
|
||||
}
|
||||
|
||||
//CHECK#1
|
||||
if (parseFloat("0x1") !== 0) {
|
||||
$ERROR('#1: parseFloat("0x1") === 0. Actual: ' + (parseFloat("0x1")));
|
||||
throw new Test262Error('#1: parseFloat("0x1") === 0. Actual: ' + (parseFloat("0x1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("0x2") !== 0) {
|
||||
$ERROR('#2: parseFloat("0x2") === 0. Actual: ' + (parseFloat("0x2")));
|
||||
throw new Test262Error('#2: parseFloat("0x2") === 0. Actual: ' + (parseFloat("0x2")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("0x3") !== 0) {
|
||||
$ERROR('#3: parseFloat("0x3") === 0. Actual: ' + (parseFloat("0x3")));
|
||||
throw new Test262Error('#3: parseFloat("0x3") === 0. Actual: ' + (parseFloat("0x3")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat("0x4") !== 0) {
|
||||
$ERROR('#4: parseFloat("0x4") === 0. Actual: ' + (parseFloat("0x4")));
|
||||
throw new Test262Error('#4: parseFloat("0x4") === 0. Actual: ' + (parseFloat("0x4")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat("0x5") !== 0) {
|
||||
$ERROR('#5: parseFloat("0x5") === 0. Actual: ' + (parseFloat("0x5")));
|
||||
throw new Test262Error('#5: parseFloat("0x5") === 0. Actual: ' + (parseFloat("0x5")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
if (parseFloat("0x6") !== 0) {
|
||||
$ERROR('#6: parseFloat("0x6") === 0. Actual: ' + (parseFloat("0x6")));
|
||||
throw new Test262Error('#6: parseFloat("0x6") === 0. Actual: ' + (parseFloat("0x6")));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
if (parseFloat("0x7") !== 0) {
|
||||
$ERROR('#7: parseFloat("0x7") === 0. Actual: ' + (parseFloat("0x7")));
|
||||
throw new Test262Error('#7: parseFloat("0x7") === 0. Actual: ' + (parseFloat("0x7")));
|
||||
}
|
||||
|
||||
//CHECK#8
|
||||
if (parseFloat("0x8") !== 0) {
|
||||
$ERROR('#8: parseFloat("0x8") === 0. Actual: ' + (parseFloat("0x8")));
|
||||
throw new Test262Error('#8: parseFloat("0x8") === 0. Actual: ' + (parseFloat("0x8")));
|
||||
}
|
||||
|
||||
//CHECK#9
|
||||
if (parseFloat("0x9") !== 0) {
|
||||
$ERROR('#9: parseFloat("0x9") === 0. Actual: ' + (parseFloat("0x9")));
|
||||
throw new Test262Error('#9: parseFloat("0x9") === 0. Actual: ' + (parseFloat("0x9")));
|
||||
}
|
||||
|
||||
//CHECK#A
|
||||
if (parseFloat("0xA") !== 0) {
|
||||
$ERROR('#A: parseFloat("0xA") === 0. Actual: ' + (parseFloat("0xA")));
|
||||
throw new Test262Error('#A: parseFloat("0xA") === 0. Actual: ' + (parseFloat("0xA")));
|
||||
}
|
||||
|
||||
//CHECK#B
|
||||
if (parseFloat("0xB") !== 0) {
|
||||
$ERROR('#B: parseFloat("0xB") === 0. Actual: ' + (parseFloat("0xB")));
|
||||
throw new Test262Error('#B: parseFloat("0xB") === 0. Actual: ' + (parseFloat("0xB")));
|
||||
}
|
||||
|
||||
//CHECK#C
|
||||
if (parseFloat("0xC") !== 0) {
|
||||
$ERROR('#C: parseFloat("0xC") === 0. Actual: ' + (parseFloat("0xC")));
|
||||
throw new Test262Error('#C: parseFloat("0xC") === 0. Actual: ' + (parseFloat("0xC")));
|
||||
}
|
||||
|
||||
//CHECK#D
|
||||
if (parseFloat("0xD") !== 0) {
|
||||
$ERROR('#D: parseFloat("0xD") === 0. Actual: ' + (parseFloat("0xD")));
|
||||
throw new Test262Error('#D: parseFloat("0xD") === 0. Actual: ' + (parseFloat("0xD")));
|
||||
}
|
||||
|
||||
//CHECK#E
|
||||
if (parseFloat("0xE") !== 0) {
|
||||
$ERROR('#E: parseFloat("0xE") === 0. Actual: ' + (parseFloat("0xE")));
|
||||
throw new Test262Error('#E: parseFloat("0xE") === 0. Actual: ' + (parseFloat("0xE")));
|
||||
}
|
||||
|
||||
//CHECK#F
|
||||
if (parseFloat("0xF") !== 0) {
|
||||
$ERROR('#F: parseFloat("0xF") === 0. Actual: ' + (parseFloat("0xF")));
|
||||
throw new Test262Error('#F: parseFloat("0xF") === 0. Actual: ' + (parseFloat("0xF")));
|
||||
}
|
||||
|
|
|
@ -11,15 +11,15 @@ description: "\"Infinity\"+\"some string\""
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("Infinity1") !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#1: parseFloat("Infinity1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity1")));
|
||||
throw new Test262Error('#1: parseFloat("Infinity1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("Infinityx") !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#2: parseFloat("Infinityx") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinityx")));
|
||||
throw new Test262Error('#2: parseFloat("Infinityx") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinityx")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("Infinity+1") !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#3: parseFloat("Infinity+1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity+1")));
|
||||
throw new Test262Error('#3: parseFloat("Infinity+1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity+1")));
|
||||
}
|
||||
|
|
|
@ -11,50 +11,50 @@ description: Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("-11.string") !== -11) {
|
||||
$ERROR('#1: parseFloat("-11.string") === -11. Actual: ' + (parseFloat("-11.string")));
|
||||
throw new Test262Error('#1: parseFloat("-11.string") === -11. Actual: ' + (parseFloat("-11.string")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("01.string") !== 1) {
|
||||
$ERROR('#2: parseFloat("01.string") === 1. Actual: ' + (parseFloat("01.string")));
|
||||
throw new Test262Error('#2: parseFloat("01.string") === 1. Actual: ' + (parseFloat("01.string")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("+11.1string") !== 11.1) {
|
||||
$ERROR('#3: parseFloat("+11.1string") === 11.1. Actual: ' + (parseFloat("+11.1string")));
|
||||
throw new Test262Error('#3: parseFloat("+11.1string") === 11.1. Actual: ' + (parseFloat("+11.1string")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat("01.1string") !== 1.1) {
|
||||
$ERROR('#4: parseFloat("01.1string") === 1.1. Actual: ' + (parseFloat("01.1string")));
|
||||
throw new Test262Error('#4: parseFloat("01.1string") === 1.1. Actual: ' + (parseFloat("01.1string")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat("-11.e-1string") !== -1.1) {
|
||||
$ERROR('#5: parseFloat("-11.e-1string") === -1.1. Actual: ' + (parseFloat("-11.e-1string")));
|
||||
throw new Test262Error('#5: parseFloat("-11.e-1string") === -1.1. Actual: ' + (parseFloat("-11.e-1string")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
if (parseFloat("01.e1string") !== 10) {
|
||||
$ERROR('#6: parseFloat("01.e1string") === 10. Actual: ' + (parseFloat("01.e1string")));
|
||||
throw new Test262Error('#6: parseFloat("01.e1string") === 10. Actual: ' + (parseFloat("01.e1string")));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
if (parseFloat("+11.22e-1string") !== 1.122) {
|
||||
$ERROR('#7: parseFloat("+11.22e-1string") === 1.122. Actual: ' + (parseFloat("+11.22e-1string")));
|
||||
throw new Test262Error('#7: parseFloat("+11.22e-1string") === 1.122. Actual: ' + (parseFloat("+11.22e-1string")));
|
||||
}
|
||||
|
||||
//CHECK#8
|
||||
if (parseFloat("01.01e1string") !== 10.1) {
|
||||
$ERROR('#8: parseFloat("01.01e1string") === 10.1. Actual: ' + (parseFloat("01.01e1string")));
|
||||
throw new Test262Error('#8: parseFloat("01.01e1string") === 10.1. Actual: ' + (parseFloat("01.01e1string")));
|
||||
}
|
||||
|
||||
//CHECK#9
|
||||
if (parseFloat("001.string") !== 1) {
|
||||
$ERROR('#9: parseFloat("001.string") === 1. Actual: ' + (parseFloat("001.string")));
|
||||
throw new Test262Error('#9: parseFloat("001.string") === 1. Actual: ' + (parseFloat("001.string")));
|
||||
}
|
||||
|
||||
//CHECK#10
|
||||
if (parseFloat("010.string") !== 10) {
|
||||
$ERROR('#10: parseFloat("010.string") === 10. Actual: ' + (parseFloat("010.string")));
|
||||
throw new Test262Error('#10: parseFloat("010.string") === 10. Actual: ' + (parseFloat("010.string")));
|
||||
}
|
||||
|
|
|
@ -11,15 +11,15 @@ description: Checking . DecimalDigits ExponentPart_opt
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("+.1string") !== 0.1) {
|
||||
$ERROR('#1: parseFloat("+.1string") === 0.1. Actual: ' + (parseFloat("+.1string")));
|
||||
throw new Test262Error('#1: parseFloat("+.1string") === 0.1. Actual: ' + (parseFloat("+.1string")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat(".01string") !== 0.01) {
|
||||
$ERROR('#2: parseFloat(".01string") === 0.01. Actual: ' + (parseFloat(".01string")));
|
||||
throw new Test262Error('#2: parseFloat(".01string") === 0.01. Actual: ' + (parseFloat(".01string")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("+.22e-1string") !== 0.022) {
|
||||
$ERROR('#3: parseFloat("+.22e-1string") === 0.022. Actual: ' + (parseFloat("+.22e-1string")));
|
||||
throw new Test262Error('#3: parseFloat("+.22e-1string") === 0.022. Actual: ' + (parseFloat("+.22e-1string")));
|
||||
}
|
||||
|
|
|
@ -11,35 +11,35 @@ description: Checking DecimalDigits ExponentPart_opt
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("-11string") !== -11) {
|
||||
$ERROR('#1: parseFloat("-11string") === -11. Actual: ' + (parseFloat("-11string")));
|
||||
throw new Test262Error('#1: parseFloat("-11string") === -11. Actual: ' + (parseFloat("-11string")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("01string") !== 1) {
|
||||
$ERROR('#2: parseFloat("01string") === 1. Actual: ' + (parseFloat("01string")));
|
||||
throw new Test262Error('#2: parseFloat("01string") === 1. Actual: ' + (parseFloat("01string")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("-11e-1string") !== -1.1) {
|
||||
$ERROR('#3: parseFloat("-11e-1string") === -1.1. Actual: ' + (parseFloat("-11e-1string")));
|
||||
throw new Test262Error('#3: parseFloat("-11e-1string") === -1.1. Actual: ' + (parseFloat("-11e-1string")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat("01e1string") !== 10) {
|
||||
$ERROR('#4: parseFloat("01e1string") === 10. Actual: ' + (parseFloat("01e1string")));
|
||||
throw new Test262Error('#4: parseFloat("01e1string") === 10. Actual: ' + (parseFloat("01e1string")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat("001string") !== 1) {
|
||||
$ERROR('#5: parseFloat("001string") === 1. Actual: ' + (parseFloat("001string")));
|
||||
throw new Test262Error('#5: parseFloat("001string") === 1. Actual: ' + (parseFloat("001string")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
if (parseFloat("1e001string") !== 10) {
|
||||
$ERROR('#6: parseFloat("1e001string") === 10. Actual: ' + (parseFloat("1e001string")));
|
||||
throw new Test262Error('#6: parseFloat("1e001string") === 10. Actual: ' + (parseFloat("1e001string")));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
if (parseFloat("010string") !== 10) {
|
||||
$ERROR('#7: parseFloat("010string") === 10. Actual: ' + (parseFloat("010string")));
|
||||
throw new Test262Error('#7: parseFloat("010string") === 10. Actual: ' + (parseFloat("010string")));
|
||||
}
|
||||
|
|
|
@ -9,15 +9,15 @@ description: Checking Infinity
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("Infinity") !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#1: parseFloat("Infinity") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity")));
|
||||
throw new Test262Error('#1: parseFloat("Infinity") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("+Infinity") !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#2: parseFloat("+Infinity") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("+Infinity")));
|
||||
throw new Test262Error('#2: parseFloat("+Infinity") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("+Infinity")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("-Infinity") !== Number.NEGATIVE_INFINITY) {
|
||||
$ERROR('#3: parseFloat("-Infinity") === Number.NEGATIVE_INFINITY. Actual: ' + (parseFloat("-Infinity")));
|
||||
throw new Test262Error('#3: parseFloat("-Infinity") === Number.NEGATIVE_INFINITY. Actual: ' + (parseFloat("-Infinity")));
|
||||
}
|
||||
|
|
|
@ -9,50 +9,50 @@ description: Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("-11.") !== -11) {
|
||||
$ERROR('#1: parseFloat("-11.") === -11. Actual: ' + (parseFloat("-11.")));
|
||||
throw new Test262Error('#1: parseFloat("-11.") === -11. Actual: ' + (parseFloat("-11.")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("01.") !== 1) {
|
||||
$ERROR('#2: parseFloat("01.") === 1. Actual: ' + (parseFloat("01.")));
|
||||
throw new Test262Error('#2: parseFloat("01.") === 1. Actual: ' + (parseFloat("01.")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("+11.1") !== 11.1) {
|
||||
$ERROR('#3: parseFloat("+11.1") === 11.1. Actual: ' + (parseFloat("+11.1")));
|
||||
throw new Test262Error('#3: parseFloat("+11.1") === 11.1. Actual: ' + (parseFloat("+11.1")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat("01.1") !== 1.1) {
|
||||
$ERROR('#4: parseFloat("01.1") === 1.1. Actual: ' + (parseFloat("01.1")));
|
||||
throw new Test262Error('#4: parseFloat("01.1") === 1.1. Actual: ' + (parseFloat("01.1")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat("-11.e-1") !== -1.1) {
|
||||
$ERROR('#5: parseFloat("-11.e-1") === -1.1. Actual: ' + (parseFloat("-11.e-1")));
|
||||
throw new Test262Error('#5: parseFloat("-11.e-1") === -1.1. Actual: ' + (parseFloat("-11.e-1")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
if (parseFloat("01.e1") !== 10) {
|
||||
$ERROR('#6: parseFloat("01.e1") === 10. Actual: ' + (parseFloat("01.e1")));
|
||||
throw new Test262Error('#6: parseFloat("01.e1") === 10. Actual: ' + (parseFloat("01.e1")));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
if (parseFloat("+11.22e-1") !== 1.122) {
|
||||
$ERROR('#7: parseFloat("+11.22e-1") === 1.122. Actual: ' + (parseFloat("+11.22e-1")));
|
||||
throw new Test262Error('#7: parseFloat("+11.22e-1") === 1.122. Actual: ' + (parseFloat("+11.22e-1")));
|
||||
}
|
||||
|
||||
//CHECK#8
|
||||
if (parseFloat("01.01e1") !== 10.1) {
|
||||
$ERROR('#8: parseFloat("01.01e1") === 10.1. Actual: ' + (parseFloat("01.01e1")));
|
||||
throw new Test262Error('#8: parseFloat("01.01e1") === 10.1. Actual: ' + (parseFloat("01.01e1")));
|
||||
}
|
||||
|
||||
//CHECK#9
|
||||
if (parseFloat("001.") !== 1) {
|
||||
$ERROR('#9: parseFloat("001.") === 1. Actual: ' + (parseFloat("001.")));
|
||||
throw new Test262Error('#9: parseFloat("001.") === 1. Actual: ' + (parseFloat("001.")));
|
||||
}
|
||||
|
||||
//CHECK#10
|
||||
if (parseFloat("010.") !== 10) {
|
||||
$ERROR('#10: parseFloat("010.") === 10. Actual: ' + (parseFloat("010.")));
|
||||
throw new Test262Error('#10: parseFloat("010.") === 10. Actual: ' + (parseFloat("010.")));
|
||||
}
|
||||
|
|
|
@ -9,15 +9,15 @@ description: Checking . DecimalDigits ExponentPart_opt
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("+.1") !== 0.1) {
|
||||
$ERROR('#1: parseFloat("+.1") === 0.1. Actual: ' + (parseFloat("+.1")));
|
||||
throw new Test262Error('#1: parseFloat("+.1") === 0.1. Actual: ' + (parseFloat("+.1")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat(".01") !== 0.01) {
|
||||
$ERROR('#2: parseFloat(".01") === 0.01. Actual: ' + (parseFloat(".01")));
|
||||
throw new Test262Error('#2: parseFloat(".01") === 0.01. Actual: ' + (parseFloat(".01")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("+.22e-1") !== 0.022) {
|
||||
$ERROR('#3: parseFloat("+.22e-1") === 0.022. Actual: ' + (parseFloat("+.22e-1")));
|
||||
throw new Test262Error('#3: parseFloat("+.22e-1") === 0.022. Actual: ' + (parseFloat("+.22e-1")));
|
||||
}
|
||||
|
|
|
@ -9,35 +9,35 @@ description: Checking DecimalDigits ExponentPart_opt
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat("-11") !== -11) {
|
||||
$ERROR('#1: parseFloat("-11") === -11. Actual: ' + (parseFloat("-11")));
|
||||
throw new Test262Error('#1: parseFloat("-11") === -11. Actual: ' + (parseFloat("-11")));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat("01") !== 1) {
|
||||
$ERROR('#2: parseFloat("01") === 1. Actual: ' + (parseFloat("01")));
|
||||
throw new Test262Error('#2: parseFloat("01") === 1. Actual: ' + (parseFloat("01")));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat("-11e-1") !== -1.1) {
|
||||
$ERROR('#3: parseFloat("-11e-1") === -1.1. Actual: ' + (parseFloat("-11e-1")));
|
||||
throw new Test262Error('#3: parseFloat("-11e-1") === -1.1. Actual: ' + (parseFloat("-11e-1")));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
if (parseFloat("01e1") !== 10) {
|
||||
$ERROR('#4: parseFloat("01e1") === 10. Actual: ' + (parseFloat("01e1")));
|
||||
throw new Test262Error('#4: parseFloat("01e1") === 10. Actual: ' + (parseFloat("01e1")));
|
||||
}
|
||||
|
||||
//CHECK#5
|
||||
if (parseFloat("001") !== 1) {
|
||||
$ERROR('#5: parseFloat("001") === 1. Actual: ' + (parseFloat("001")));
|
||||
throw new Test262Error('#5: parseFloat("001") === 1. Actual: ' + (parseFloat("001")));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
if (parseFloat("1e001") !== 10) {
|
||||
$ERROR('#6: parseFloat("1e001") === 10. Actual: ' + (parseFloat("1e001")));
|
||||
throw new Test262Error('#6: parseFloat("1e001") === 10. Actual: ' + (parseFloat("1e001")));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
if (parseFloat("010") !== 10) {
|
||||
$ERROR('#7: parseFloat("010") === 10. Actual: ' + (parseFloat("010")));
|
||||
throw new Test262Error('#7: parseFloat("010") === 10. Actual: ' + (parseFloat("010")));
|
||||
}
|
||||
|
|
|
@ -28,11 +28,11 @@ for (var index = 0; index <= 65535; index++) {
|
|||
if ((indexP - indexO) !== 0) {
|
||||
var hexP = decimalToHexString(indexP);
|
||||
var hexO = decimalToHexString(indexO);
|
||||
$ERROR('#' + hexO + '-' + hexP + ' ');
|
||||
throw new Test262Error('#' + hexO + '-' + hexP + ' ');
|
||||
}
|
||||
else {
|
||||
var hexP = decimalToHexString(indexP);
|
||||
$ERROR('#' + hexP + ' ');
|
||||
throw new Test262Error('#' + hexP + ' ');
|
||||
}
|
||||
indexO = index;
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ if (errorCount > 0) {
|
|||
if ((indexP - indexO) !== 0) {
|
||||
var hexP = decimalToHexString(indexP);
|
||||
var hexO = decimalToHexString(indexO);
|
||||
$ERROR('#' + hexO + '-' + hexP + ' ');
|
||||
throw new Test262Error('#' + hexO + '-' + hexP + ' ');
|
||||
} else {
|
||||
var hexP = decimalToHexString(indexP);
|
||||
$ERROR('#' + hexP + ' ');
|
||||
throw new Test262Error('#' + hexP + ' ');
|
||||
}
|
||||
$ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
|
||||
throw new Test262Error('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ description: Checking use propertyIsEnumerable, for-in
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat.propertyIsEnumerable('length') !== false) {
|
||||
$ERROR('#1: parseFloat.propertyIsEnumerable(\'length\') === false. Actual: ' + (parseFloat.propertyIsEnumerable('length')));
|
||||
throw new Test262Error('#1: parseFloat.propertyIsEnumerable(\'length\') === false. Actual: ' + (parseFloat.propertyIsEnumerable('length')));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
|
@ -21,5 +21,5 @@ for (var p in parseFloat) {
|
|||
}
|
||||
|
||||
if (result !== true) {
|
||||
$ERROR('#2: result = true; for (p in parseFloat) { if (p === "length") result = false; } result === true;');
|
||||
throw new Test262Error('#2: result = true; for (p in parseFloat) { if (p === "length") result = false; } result === true;');
|
||||
}
|
||||
|
|
|
@ -9,17 +9,17 @@ description: Checking use hasOwnProperty, delete
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat.hasOwnProperty('length') !== true) {
|
||||
$ERROR('#1: parseFloat.hasOwnProperty(\'length\') === true. Actual: ' + (parseFloat.hasOwnProperty('length')));
|
||||
throw new Test262Error('#1: parseFloat.hasOwnProperty(\'length\') === true. Actual: ' + (parseFloat.hasOwnProperty('length')));
|
||||
}
|
||||
|
||||
delete parseFloat.length;
|
||||
|
||||
//CHECK#2
|
||||
if (parseFloat.hasOwnProperty('length') !== false) {
|
||||
$ERROR('#2: delete parseFloat.length; parseFloat.hasOwnProperty(\'length\') === false. Actual: ' + (parseFloat.hasOwnProperty('length')));
|
||||
throw new Test262Error('#2: delete parseFloat.length; parseFloat.hasOwnProperty(\'length\') === false. Actual: ' + (parseFloat.hasOwnProperty('length')));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
if (parseFloat.length === undefined) {
|
||||
$ERROR('#3: delete parseFloat.length; parseFloat.length !== undefined');
|
||||
throw new Test262Error('#3: delete parseFloat.length; parseFloat.length !== undefined');
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@ includes: [propertyHelper.js]
|
|||
var x = parseFloat.length;
|
||||
verifyNotWritable(parseFloat, "length", null, Infinity);
|
||||
if (parseFloat.length !== x) {
|
||||
$ERROR('#1: x = parseFloat.length; parseFloat.length = Infinity; parseFloat.length === x. Actual: ' + (parseFloat.length));
|
||||
throw new Test262Error('#1: x = parseFloat.length; parseFloat.length = Infinity; parseFloat.length === x. Actual: ' + (parseFloat.length));
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: parseFloat.length === 1
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat.length !== 1) {
|
||||
$ERROR('#1: parseFloat.length === 1. Actual: ' + (parseFloat.length));
|
||||
throw new Test262Error('#1: parseFloat.length === 1. Actual: ' + (parseFloat.length));
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ description: Checking use propertyIsEnumerable, for-in
|
|||
|
||||
//CHECK#1
|
||||
if (this.propertyIsEnumerable('parseFloat') !== false) {
|
||||
$ERROR('#1:this.propertyIsEnumerable(\'parseFloat\') === false. Actual: ' + (this.propertyIsEnumerable('parseFloat')));
|
||||
throw new Test262Error('#1:this.propertyIsEnumerable(\'parseFloat\') === false. Actual: ' + (this.propertyIsEnumerable('parseFloat')));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
|
@ -21,5 +21,5 @@ for (var p in this) {
|
|||
}
|
||||
|
||||
if (result !== true) {
|
||||
$ERROR('#2: result = true; for (p in this) { if (p === "parseFloat") result = false; } result === true;');
|
||||
throw new Test262Error('#2: result = true; for (p in this) { if (p === "parseFloat") result = false; } result === true;');
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: Checking parseFloat.prototype
|
|||
|
||||
//CHECK#1
|
||||
if (parseFloat.prototype !== undefined) {
|
||||
$ERROR('#1: parseFloat.prototype === undefined. Actual: ' + (parseFloat.prototype));
|
||||
throw new Test262Error('#1: parseFloat.prototype === undefined. Actual: ' + (parseFloat.prototype));
|
||||
}
|
||||
|
|
|
@ -13,9 +13,9 @@ description: >
|
|||
|
||||
try {
|
||||
new parseFloat();
|
||||
$ERROR('#1.1: new parseFloat() throw TypeError. Actual: ' + (new parseFloat()));
|
||||
throw new Test262Error('#1.1: new parseFloat() throw TypeError. Actual: ' + (new parseFloat()));
|
||||
} catch (e) {
|
||||
if ((e instanceof TypeError) !== true) {
|
||||
$ERROR('#1.2: new parseFloat() throw TypeError. Actual: ' + (e));
|
||||
throw new Test262Error('#1.2: new parseFloat() throw TypeError. Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue