mirror of https://github.com/tc39/test262.git
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/String (#3093)
This commit is contained in:
parent
82e0487797
commit
d558af3ac0
|
@ -14,7 +14,7 @@ var __str = String(function() {}());
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(function(){}()); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(function(){}()); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "undefined") {
|
||||
$ERROR('#2: __str = String(function(){}()); __str === "undefined". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(function(){}()); __str === "undefined". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(1);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(1); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(1); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "1") {
|
||||
$ERROR('#2: __str = String(1); __str === "1". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(1); __str === "1". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ __str = String(-1);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String(-1); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String(-1); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "-1") {
|
||||
$ERROR('#4: __str = String(-1); __str === "-1". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String(-1); __str === "-1". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(1 / 0);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(1/0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(1/0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "Infinity") {
|
||||
$ERROR('#2: __str = String(1/0); __str === "Infinity". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(1/0); __str === "Infinity". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ __str = String(-1 / 0);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String(-1/0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String(-1/0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str !== "-Infinity") {
|
||||
$ERROR('#4: __str = String(-1/0); __str === "-Infinity". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String(-1/0); __str === "-Infinity". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -50,7 +50,7 @@ __str = String(Infinity);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#5: __str = String(Infinity); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#5: __str = String(Infinity); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#6
|
||||
if (__str !== "Infinity") {
|
||||
$ERROR('#6: __str = String(Infinity); __str === "Infinity". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#6: __str = String(Infinity); __str === "Infinity". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -68,7 +68,7 @@ __str = String(-Infinity);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#7
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#7: __str = String(-Infinity); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#7: __str = String(-Infinity); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -76,7 +76,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#8
|
||||
if (__str !== "-Infinity") {
|
||||
$ERROR('#8: __str = String(-Infinity); __str === "-Infinity". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#8: __str = String(-Infinity); __str === "-Infinity". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -86,7 +86,7 @@ __str = String(Number.POSITIVE_INFINITY);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#9
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#9: __str = String(Number.POSITIVE_INFINITY); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#9: __str = String(Number.POSITIVE_INFINITY); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -94,7 +94,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#10
|
||||
if (__str !== "Infinity") {
|
||||
$ERROR('#10: __str = String(Number.POSITIVE_INFINITY); __str === "Infinity". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#10: __str = String(Number.POSITIVE_INFINITY); __str === "Infinity". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -104,7 +104,7 @@ __str = String(Number.NEGATIVE_INFINITY);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#11
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#11: __str = String(Number.NEGATIVE_INFINITY); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#11: __str = String(Number.NEGATIVE_INFINITY); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -112,7 +112,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#12
|
||||
if (__str !== "-Infinity") {
|
||||
$ERROR('#12: __str = String(Number.NEGATIVE_INFINITY); __str === "-Infinity". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#12: __str = String(Number.NEGATIVE_INFINITY); __str === "-Infinity". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(1 / "a");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(1/"a"); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(1/"a"); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "NaN") {
|
||||
$ERROR('#2: __str = String(1/"a"); __str === "NaN". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(1/"a"); __str === "NaN". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ __str = String("b" * null);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String("b"*null); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String("b"*null); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str !== "NaN") {
|
||||
$ERROR('#4: __str = String("b"*null); __str === "NaN". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String("b"*null); __str === "NaN". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -50,7 +50,7 @@ __str = String(Number.NaN);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#5: __str = String(Number.NaN); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#5: __str = String(Number.NaN); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#6
|
||||
if (__str !== "NaN") {
|
||||
$ERROR('#6: __str = String(Number.NaN); __str === "NaN". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#6: __str = String(Number.NaN); __str === "NaN". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(true);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(true); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(true); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "true") {
|
||||
$ERROR('#2: __str = String(true); __str === "true". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(true); __str === "true". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ __str = String(false);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String(false); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String(false); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str !== "false") {
|
||||
$ERROR('#4: __str = String(false); __str === "false". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String(false); __str === "false". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -50,7 +50,7 @@ __str = String(Boolean(true));
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#5: __str = String(Boolean(true)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#5: __str = String(Boolean(true)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#6
|
||||
if (__str !== "true") {
|
||||
$ERROR('#6: __str = String(Boolean(true)); __str === "true". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#6: __str = String(Boolean(true)); __str === "true". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -68,7 +68,7 @@ __str = String(Boolean(false));
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#7
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#7: __str = String(Boolean(false)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#7: __str = String(Boolean(false)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -76,7 +76,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#8
|
||||
if (__str !== "false") {
|
||||
$ERROR('#8: __str = String(Boolean(false)); __str === "false". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#8: __str = String(Boolean(false)); __str === "false". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(0);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "0") {
|
||||
$ERROR('#2: __str = String(0); __str === "0". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(0); __str === "0". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ __str = String(-0);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String(-0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String(-0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "0") {
|
||||
$ERROR('#4: __str = String(-0); __str === "0". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String(-0); __str === "0". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -18,7 +18,7 @@ var __str = String(__obj__str);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__str !== __obj__str) {
|
||||
$ERROR('#1: __obj__str = "caps"; __str = String(__obj__str); __str === __obj__str. Actual: __str ===' + __str);
|
||||
throw new Test262Error('#1: __obj__str = "caps"; __str = String(__obj__str); __str === __obj__str. Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(.12345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(.12345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(.12345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "0.12345") {
|
||||
$ERROR('#2: __str = String(.12345); __str === "0.12345". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(.12345); __str === "0.12345". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ __str = String(.012345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String(.012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String(.012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str !== "0.012345") {
|
||||
$ERROR('#4: __str = String(.012345); __str === "0.012345". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String(.012345); __str === "0.012345". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -50,7 +50,7 @@ __str = String(.0012345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#5: __str = String(.0012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#5: __str = String(.0012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#6
|
||||
if (__str !== "0.0012345") {
|
||||
$ERROR('#6: __str = String(.0012345); __str === "0.0012345". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#6: __str = String(.0012345); __str === "0.0012345". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -68,7 +68,7 @@ __str = String(.00000012345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#7
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#7: __str = String(.00000012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#7: __str = String(.00000012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -76,7 +76,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#8
|
||||
if (__str !== "1.2345e-7") {
|
||||
$ERROR('#8: __str = String(.00000012345); __str === "1.2345e-7". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#8: __str = String(.00000012345); __str === "1.2345e-7". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -16,7 +16,7 @@ var __str = String(1.2345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(1.2345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(1.2345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -24,7 +24,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "1.2345") {
|
||||
$ERROR('#2: __str = String(1.2345); __str === "1.2345". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(1.2345); __str === "1.2345". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -34,7 +34,7 @@ __str = String(1.234567890);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String(1.234567890); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String(1.234567890); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -42,7 +42,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str !== "1.23456789") {
|
||||
$ERROR('#4: __str = String(1.234567890); __str === "1.23456789". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String(1.234567890); __str === "1.23456789". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -52,7 +52,7 @@ __str = String(1.234500000000000000000000000);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#5: __str = String(1.234500000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#5: __str = String(1.234500000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -60,7 +60,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#6
|
||||
if (__str !== "1.2345") {
|
||||
$ERROR('#6: __str = String(1.234500000000000000000000000); __str === "1.2345". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#6: __str = String(1.234500000000000000000000000); __str === "1.2345". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(1000000000000000000000);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(1000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(1000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "1e+21") {
|
||||
$ERROR('#2: __str = String(1000000000000000000000); __str === "1e+21". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(1000000000000000000000); __str === "1e+21". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ __str = String(10000000000000000000000);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#3: __str = String(10000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = String(10000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str !== "1e+22") {
|
||||
$ERROR('#4: __str = String(10000000000000000000000); __str === "1e+22". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#4: __str = String(10000000000000000000000); __str === "1e+22". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(new Array(1, 2, 3));
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(new Array(1,2,3)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(new Array(1,2,3)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "1,2,3") {
|
||||
$ERROR('#2: __str = String(new Array(1,2,3)); __str === "1,2,3". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(new Array(1,2,3)); __str === "1,2,3". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(null);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(null); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(null); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "null") {
|
||||
$ERROR('#2: __str = String(null); __str === "null". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(null); __str === "null". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(void 0);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(void 0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(void 0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "undefined") {
|
||||
$ERROR('#2: __str = String(void 0); __str === "undefined". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(void 0); __str === "undefined". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(undefined);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(undefined); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(undefined); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "undefined") {
|
||||
$ERROR('#2: __str = String(undefined); __str === "undefined". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(undefined); __str === "undefined". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(x);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: var x; __str = String(x); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: var x; __str = String(x); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "undefined") {
|
||||
$ERROR('#2: var x; __str = String(x); __str === "undefined". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: var x; __str = String(x); __str === "undefined". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String(eval());
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(eval()); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(eval()); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "undefined") {
|
||||
$ERROR('#2: __str = String(eval()); __str === "undefined". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(eval()); __str === "undefined". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = String({});
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String({}); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String({}); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "[object " + "Object" + "]") {
|
||||
$ERROR('#2: __str = String({}); __str === "[object Object]". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String({}); __str === "[object Object]". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -23,7 +23,7 @@ Array.prototype.toString = __old__Array__prototype__toString;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(new Array); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(new Array); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,7 +31,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "__ARRAY__") {
|
||||
$ERROR('#2: Array.prototype.toString=function(){return "__ARRAY__";}; __str = String(new Array); __str === "__ARRAY__". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: Array.prototype.toString=function(){return "__ARRAY__";}; __str = String(new Array); __str === "__ARRAY__". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -18,7 +18,7 @@ var __str = String(this);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(this); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(this); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -26,7 +26,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "__THIS__") {
|
||||
$ERROR('#2: toString=function(){return "__THIS__";}; __str = String(this); __str === "__THIS__". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: toString=function(){return "__THIS__";}; __str = String(this); __str === "__THIS__". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -12,7 +12,7 @@ var __str = String();
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "string") {
|
||||
$ERROR('#1: __str = String(); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = String(); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -20,7 +20,7 @@ if (typeof __str !== "string") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str !== "") {
|
||||
$ERROR('#2: __str = String(); __str === "". Actual: __str ===' + __str);
|
||||
throw new Test262Error('#2: __str = String(); __str === "". Actual: __str ===' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = new String;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String; typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String; typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String; __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String; __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "") {
|
||||
$ERROR('#2: __str = new String; __str == "". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String; __str == "". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -38,7 +38,7 @@ if (__str != "") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (__str === "") {
|
||||
$ERROR('#3: __str = new String; __str !== ""');
|
||||
throw new Test262Error('#3: __str = new String; __str !== ""');
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -24,7 +24,7 @@ var __str = new String(__obj);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(__obj); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(__obj); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -32,7 +32,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "tostr") {
|
||||
$ERROR('#2: __str = new String(__obj); __str =="tostr". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(__obj); __str =="tostr". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -28,7 +28,7 @@ var __str = new String(__obj);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: function __obj(){}; __str = new String(__obj); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: function __obj(){}; __str = new String(__obj); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -36,7 +36,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -44,7 +44,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "true") {
|
||||
$ERROR('#2: function __obj(){}; __str = new String(__obj); __str =="true". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: function __obj(){}; __str = new String(__obj); __str =="true". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -26,10 +26,10 @@ __obj.valueOf = function() {
|
|||
//CHECK#1
|
||||
try {
|
||||
var __str = new String(__obj);
|
||||
$ERROR('#1: var __obj = {toString:function(){throw "intostr"}}; __str = new String(__obj) lead throwing exception');
|
||||
throw new Test262Error('#1: var __obj = {toString:function(){throw "intostr"}}; __str = new String(__obj) lead throwing exception');
|
||||
} catch (e) {
|
||||
if (e !== "intostr") {
|
||||
$ERROR('#1.1: e==="intostr". Actual: e===' + e);
|
||||
throw new Test262Error('#1.1: e==="intostr". Actual: e===' + e);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -28,10 +28,10 @@ __obj.valueOf = function() {
|
|||
//CHECK#1
|
||||
try {
|
||||
var __str = new String(__obj);
|
||||
$ERROR('#1: __obj.valueOf=function(){throw "invalueof"}; __str = new String(__obj) lead throwing exception');
|
||||
throw new Test262Error('#1: __obj.valueOf=function(){throw "invalueof"}; __str = new String(__obj) lead throwing exception');
|
||||
} catch (e) {
|
||||
if (e !== "invalueof") {
|
||||
$ERROR('#1.1: e==="invalueof". Actual: e===' + e);
|
||||
throw new Test262Error('#1.1: e==="invalueof". Actual: e===' + e);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -15,7 +15,7 @@ var __str = new String(.12345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str =new String(.12345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str =new String(.12345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -23,7 +23,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str =new String(.12345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str =new String(.12345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,7 +31,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "0.12345") {
|
||||
$ERROR('#2: __str =new String(.12345); __str =="0.12345". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str =new String(.12345); __str =="0.12345". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ __str = new String(.012345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#3: __str =new String(.012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str =new String(.012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -48,7 +48,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#3.5: __str =new String(.012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#3.5: __str =new String(.012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -56,7 +56,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str != "0.012345") {
|
||||
$ERROR('#4: __str =new String(.012345); __str =="0.012345". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#4: __str =new String(.012345); __str =="0.012345". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -65,7 +65,7 @@ __str = new String(.0012345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#5: __str =new String(.0012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#5: __str =new String(.0012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -73,7 +73,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#5.5: __str =new String(.0012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#5.5: __str =new String(.0012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -81,7 +81,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#6
|
||||
if (__str != "0.0012345") {
|
||||
$ERROR('#6: __str =new String(.0012345); __str =="0.0012345". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#6: __str =new String(.0012345); __str =="0.0012345". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -90,7 +90,7 @@ __str = new String(.00000012345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#7
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#7: __str =new String(.00000012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#7: __str =new String(.00000012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -98,7 +98,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#7.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#7.5: __str =new String(.00000012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#7.5: __str =new String(.00000012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -106,7 +106,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#8
|
||||
if (__str != "1.2345e-7") {
|
||||
$ERROR('#8: __str =new String(.00000012345); __str =="1.2345e-7". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#8: __str =new String(.00000012345); __str =="1.2345e-7". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -15,7 +15,7 @@ var __str = new String(1.2345);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(1.2345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(1.2345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -23,7 +23,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(1.2345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(1.2345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,7 +31,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "1.2345") {
|
||||
$ERROR('#2: __str = new String(1.2345); __str =="1.2345". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(1.2345); __str =="1.2345". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ __str = new String(1.234567890);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#3: __str = new String(1.234567890); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = new String(1.234567890); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -48,7 +48,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#3.5: __str = new String(1.234567890); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#3.5: __str = new String(1.234567890); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -56,7 +56,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str != "1.23456789") {
|
||||
$ERROR('#4: __str = new String(1.234567890); __str =="1.23456789". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#4: __str = new String(1.234567890); __str =="1.23456789". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -65,7 +65,7 @@ __str = new String(1.234500000000000000000000000);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#5: __str = new String(1.234500000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#5: __str = new String(1.234500000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -73,7 +73,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#5.5: __str = new String(1.234500000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#5.5: __str = new String(1.234500000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -81,7 +81,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#6
|
||||
if (__str != "1.2345") {
|
||||
$ERROR('#6: __str = new String(1.234500000000000000000000000); __str =="1.2345". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#6: __str = new String(1.234500000000000000000000000); __str =="1.2345". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -15,7 +15,7 @@ var __str = new String(1000000000000000000000);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(1000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(1000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -23,7 +23,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(1000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(1000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,7 +31,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "1e+21") {
|
||||
$ERROR('#2: __str = new String(1000000000000000000000); __str =="1e+21". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(1000000000000000000000); __str =="1e+21". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,7 +40,7 @@ __str = new String(10000000000000000000000);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#3: __str = new String(10000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#3: __str = new String(10000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -48,7 +48,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#3.5: __str = new String(10000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#3.5: __str = new String(10000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -56,7 +56,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str != "1e+22") {
|
||||
$ERROR('#4: __str = new String(10000000000000000000000); __str =="1e+22". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#4: __str = new String(10000000000000000000000); __str =="1e+22". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -15,7 +15,7 @@ var __str = new String(new Array(1, 2, 3));
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(new Array(1,2,3)); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(new Array(1,2,3)); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -23,7 +23,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(new Array(1,2,3)); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(new Array(1,2,3)); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,7 +31,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "1,2,3") {
|
||||
$ERROR('#2: __str = new String(new Array(1,2,3)); __str =="1,2,3". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(new Array(1,2,3)); __str =="1,2,3". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = new String();
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "") {
|
||||
$ERROR('#2: __str = new String(); __str =="". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(); __str =="". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -38,7 +38,7 @@ if (__str != "") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (__str === "") {
|
||||
$ERROR('#3: __str = new String(); __str !== ""');
|
||||
throw new Test262Error('#3: __str = new String(); __str !== ""');
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = new String("");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(""); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(""); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(""); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(""); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "") {
|
||||
$ERROR('#2: __str = new String(""); __str =="". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(""); __str =="". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -38,7 +38,7 @@ if (__str != "") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (__str === "") {
|
||||
$ERROR('#3: __str = new String(""); __str !== ""');
|
||||
throw new Test262Error('#3: __str = new String(""); __str !== ""');
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = new String(1.0);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(1.0); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(1.0); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(1.0); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(1.0); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != 1.0 + "") {
|
||||
$ERROR('#2: __str = new String(1.0); __str ==1.0+"". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(1.0); __str ==1.0+"". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = new String(NaN);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(NaN); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(NaN); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(NaN); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(NaN); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != (1 / "s") + "") {
|
||||
$ERROR('#2: __str = new String(NaN); __str ==(1/"s")+"". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(NaN); __str ==(1/"s")+"". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str = new String(false);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(false); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(false); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(false); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(false); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != false + "") {
|
||||
$ERROR('#2: __str = new String(false); __str ==false+"". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(false); __str ==false+"". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -22,7 +22,7 @@ Object.prototype.toString = __stored__Object__prototype__toString;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String({}); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String({}); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String({}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String({}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -38,7 +38,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "SHIFTED") {
|
||||
$ERROR('#2: Object.prototype.toString=function(){return "SHIFTED"}; __str = new String({}); __str =="SHIFTED". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: Object.prototype.toString=function(){return "SHIFTED"}; __str = new String({}); __str =="SHIFTED". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -22,7 +22,7 @@ Function.prototype.toString = __stored__Function__prototype__toString;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(function(){}); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(function(){}); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -30,7 +30,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(function(){}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(function(){}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -38,7 +38,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "SHIFTED") {
|
||||
$ERROR('#2: Function.prototype.toString=function(){return "SHIFTED"}; __str = new String(function(){}); __str =="SHIFTED". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: Function.prototype.toString=function(){return "SHIFTED"}; __str = new String(function(){}); __str =="SHIFTED". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -18,7 +18,7 @@ var __str = new String(function() {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof __str !== "object") {
|
||||
$ERROR('#1: __str = new String(function(){return [1,2,3]}()); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
throw new Test262Error('#1: __str = new String(function(){return [1,2,3]}()); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -26,7 +26,7 @@ if (typeof __str !== "object") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1.5
|
||||
if (__str.constructor !== String) {
|
||||
$ERROR('#1.5: __str = new String(function(){return [1,2,3]}()); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
throw new Test262Error('#1.5: __str = new String(function(){return [1,2,3]}()); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -34,7 +34,7 @@ if (__str.constructor !== String) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str != "1,2,3") {
|
||||
$ERROR('#2: __str = new String(function(){return [1,2,3]}()); __str =="1,2,3". Actual: __str ==' + __str);
|
||||
throw new Test262Error('#2: __str = new String(function(){return [1,2,3]}()); __str =="1,2,3". Actual: __str ==' + __str);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str__obj = new String("abba");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(String.prototype.isPrototypeOf(__str__obj))) {
|
||||
$ERROR('#1: var __str__obj = new String("abba"); String.prototype.isPrototypeOf(__str__obj)===true');
|
||||
throw new Test262Error('#1: var __str__obj = new String("abba"); String.prototype.isPrototypeOf(__str__obj)===true');
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -16,7 +16,7 @@ var __str__obj = new String("shocking blue");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__str__obj["__custom__prop"] !== undefined) {
|
||||
$ERROR('#1: var __str__obj = new String("shocking blue"); __str__obj["__custom__prop"]===undefined. Actual: __str__obj["__custom__prop"]===' + __str__obj["__custom__prop"]);
|
||||
throw new Test262Error('#1: var __str__obj = new String("shocking blue"); __str__obj["__custom__prop"]===undefined. Actual: __str__obj["__custom__prop"]===' + __str__obj["__custom__prop"]);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -26,7 +26,7 @@ String.prototype.__custom__prop = "bor";
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str__obj["__custom__prop"] !== "bor") {
|
||||
$ERROR('#2: var __str__obj = new String("shocking blue"); String.prototype.__custom__prop = "bor"; __str__obj["__custom__prop"]==="bor". Actual: __str__obj["__custom__prop"]===' + __str__obj["__custom__prop"]);
|
||||
throw new Test262Error('#2: var __str__obj = new String("shocking blue"); String.prototype.__custom__prop = "bor"; __str__obj["__custom__prop"]==="bor". Actual: __str__obj["__custom__prop"]===' + __str__obj["__custom__prop"]);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -16,7 +16,7 @@ __str__obj.toString = Object.prototype.toString;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__str__obj.toString() !== "[object " + "String" + "]") {
|
||||
$ERROR('#1: var __str__obj = new String("seamaid"); __str__obj.toString = Object.prototype.toString; __str__obj.toString() === "[object String]". Actual: __str__obj.toString() ===' + __str__obj.toString());
|
||||
throw new Test262Error('#1: var __str__obj = new String("seamaid"); __str__obj.toString = Object.prototype.toString; __str__obj.toString() === "[object String]". Actual: __str__obj.toString() ===' + __str__obj.toString());
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Checking String.length
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CHECK#
|
||||
if (String.length !== 1) {
|
||||
$ERROR('String has length property whose value is 1. Actual: String.length===' + String.length);
|
||||
throw new Test262Error('String has length property whose value is 1. Actual: String.length===' + String.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -12,7 +12,7 @@ description: Checking Function.prototype.isPrototypeOf(String)
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CHECK#
|
||||
if (!(Function.prototype.isPrototypeOf(String))) {
|
||||
$ERROR('#1: Function.prototype.isPrototypeOf(String) return true. Actual: ' + Function.prototype.isPrototypeOf(String));
|
||||
throw new Test262Error('#1: Function.prototype.isPrototypeOf(String) return true. Actual: ' + Function.prototype.isPrototypeOf(String));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ Function.prototype.indicator = 1;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CHECK#
|
||||
if (String.indicator !== 1) {
|
||||
$ERROR('#1: Function.prototype.indicator = 1; String.indicator === 1. Actual: String.indicator ===' + String.indicator);
|
||||
throw new Test262Error('#1: Function.prototype.indicator = 1; String.indicator === 1. Actual: String.indicator ===' + String.indicator);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str__instance = new String("ABC\u0041\u0042\u0043");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__str__instance.length !== 6) {
|
||||
$ERROR('#1: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.length === 6, where __str__instance is new String("ABC\\u0041\\u0042\\u0043"). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#1: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.length === 6, where __str__instance is new String("ABC\\u0041\\u0042\\u0043"). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -24,7 +24,7 @@ __str__instance = new String;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str__instance.length !== 0) {
|
||||
$ERROR('#2: __str__instance = new String; __str__instance.length === 0, where __str__instance is new String. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#2: __str__instance = new String; __str__instance.length === 0, where __str__instance is new String. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -12,7 +12,7 @@ var __str__instance = new String("globglob");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(__str__instance.hasOwnProperty("length"))) {
|
||||
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
throw new Test262Error('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -21,7 +21,7 @@ if (!(__str__instance.hasOwnProperty("length"))) {
|
|||
//CHECK#2
|
||||
for (var prop in __str__instance) {
|
||||
if (prop === "length") {
|
||||
$ERROR('#2: length property has the attributes {DontEnum}');
|
||||
throw new Test262Error('#2: length property has the attributes {DontEnum}');
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -13,7 +13,7 @@ var __str__instance = new String("globglob");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(__str__instance.hasOwnProperty("length"))) {
|
||||
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
throw new Test262Error('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -24,7 +24,7 @@ verifyNotConfigurable(__str__instance, "length");
|
|||
//CHECK#2
|
||||
try {
|
||||
if (delete __str__instance.length === true) {
|
||||
$ERROR('#2: var __str__instance = new String("globglob"); delete __str__instance.length !== true');
|
||||
throw new Test262Error('#2: var __str__instance = new String("globglob"); delete __str__instance.length !== true');
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof Test262Error) throw e;
|
||||
|
@ -36,7 +36,7 @@ try {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (!(__str__instance.hasOwnProperty("length"))) {
|
||||
$ERROR('#3: var __str__instance = new String("globglob"); delete __str__instance.length; __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
throw new Test262Error('#3: var __str__instance = new String("globglob"); delete __str__instance.length; __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -13,7 +13,7 @@ var __str__instance = new String("globglob");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(__str__instance.hasOwnProperty("length"))) {
|
||||
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
throw new Test262Error('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -21,7 +21,7 @@ if (!(__str__instance.hasOwnProperty("length"))) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str__instance.length !== 8) {
|
||||
$ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,7 +31,7 @@ __str__instance.length = -1;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (__str__instance.length !== 8) {
|
||||
$ERROR('#3: var __str__instance = new String("globglob"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#3: var __str__instance = new String("globglob"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -42,7 +42,7 @@ length = 0;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#4
|
||||
if (__str__instance.length !== 8) {
|
||||
$ERROR('#4: var __str__instance = new String("globglob"); with(__str__instance) length = 0; __str__instance.length === 8(after redefine length property with using "with"). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#4: var __str__instance = new String("globglob"); with(__str__instance) length = 0; __str__instance.length === 8(after redefine length property with using "with"). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -52,7 +52,7 @@ __str__instance.length++;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#5
|
||||
if (__str__instance.length !== 8) {
|
||||
$ERROR('#5: var __str__instance = new String("globglob"); __str__instance.length++; __str__instance.length === 8(after redefine length property with using "++"). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#5: var __str__instance = new String("globglob"); __str__instance.length++; __str__instance.length === 8(after redefine length property with using "++"). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -13,7 +13,7 @@ var __str__instance = new String("globglob");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(__str__instance.hasOwnProperty("length"))) {
|
||||
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
throw new Test262Error('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -21,7 +21,7 @@ if (!(__str__instance.hasOwnProperty("length"))) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str__instance.length !== 8) {
|
||||
$ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,7 +31,7 @@ verifyNotWritable(__str__instance, "length", null, -1);
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (__str__instance.length !== 8) {
|
||||
$ERROR('#3: var __str__instance = new String("globglob"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#3: var __str__instance = new String("globglob"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ var __str__instance = new String("ABC\u0041\u0042\u0043");
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__str__instance.length !== 6) {
|
||||
$ERROR('#1: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.length === 6. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#1: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.length === 6. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -29,7 +29,7 @@ __str__instance.toString = function() {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (__str__instance != "ed") {
|
||||
$ERROR('#2: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.valueOf = function(){return "ed"}; __str__instance.toString = function(){return "ed"}; __str__instance =="ed". Actual: __str__instance ==' + __str__instance);
|
||||
throw new Test262Error('#2: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.valueOf = function(){return "ed"}; __str__instance.toString = function(){return "ed"}; __str__instance =="ed". Actual: __str__instance ==' + __str__instance);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -37,7 +37,7 @@ if (__str__instance != "ed") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (__str__instance.length !== 6) {
|
||||
$ERROR('#3: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.valueOf = function(){return "ed"}; __str__instance.toString = function(){return "ed"}; __str__instance.length === 6. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
throw new Test262Error('#3: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.valueOf = function(){return "ed"}; __str__instance.toString = function(){return "ed"}; __str__instance.length === 6. Actual: __str__instance.length ===' + __str__instance.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -13,10 +13,10 @@ var __str = new String;
|
|||
//CHECK#1
|
||||
try {
|
||||
__str();
|
||||
$ERROR('#1: __str = new String; __str() lead to throwing exception');
|
||||
throw new Test262Error('#1: __str = new String; __str() lead to throwing exception');
|
||||
} catch (e) {
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
throw new Test262Error('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -11,10 +11,10 @@ description: Checking if creating new "String("a|b")()" fails
|
|||
//CHECK#1
|
||||
try {
|
||||
String("a|b")();
|
||||
$ERROR('#1: String("a|b")() lead to throwing exception');
|
||||
throw new Test262Error('#1: String("a|b")() lead to throwing exception');
|
||||
} catch (e) {
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
throw new Test262Error('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -13,10 +13,10 @@ var __str = new Object("");
|
|||
//CHECK#1
|
||||
try {
|
||||
new __str;
|
||||
$ERROR('#1: __str = new Object(""); "new __str" lead to throwing exception');
|
||||
throw new Test262Error('#1: __str = new Object(""); "new __str" lead to throwing exception');
|
||||
} catch (e) {
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
throw new Test262Error('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -11,10 +11,10 @@ description: Checking if creating "new String" fails
|
|||
//CHECK#1
|
||||
try {
|
||||
new new String;
|
||||
$ERROR('#1: "new new String" lead to throwing exception');
|
||||
throw new Test262Error('#1: "new new String" lead to throwing exception');
|
||||
} catch (e) {
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
throw new Test262Error('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -18,11 +18,11 @@ try
|
|||
}
|
||||
}
|
||||
String(__obj);
|
||||
$ERROR('#1.1: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (String(__obj)));
|
||||
throw new Test262Error('#1.1: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (String(__obj)));
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
if ((e instanceof TypeError) !== true) {
|
||||
$ERROR('#1.2: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (e));
|
||||
throw new Test262Error('#1.2: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ try
|
|||
}
|
||||
}
|
||||
if (String(__obj) !== "1") {
|
||||
$ERROR('#1.1: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (String(__obj)));
|
||||
throw new Test262Error('#1.1: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (String(__obj)));
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
$ERROR('#1.2: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (e));
|
||||
throw new Test262Error('#1.2: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (e));
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (String(object) !== "1") {
|
||||
$ERROR('#1: var object = {valueOf: function() {return 0}, toString: function() {return 1}}; String(object) === "1". Actual: ' + (String(object)));
|
||||
throw new Test262Error('#1: var object = {valueOf: function() {return 0}, toString: function() {return 1}}; String(object) === "1". Actual: ' + (String(object)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
|
@ -34,5 +34,5 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (String(object) !== "0") {
|
||||
$ERROR('#2: var object = {valueOf: function() {return 0}, toString: function() {return {}}}; String(object) === "0". Actual: ' + (String(object)));
|
||||
throw new Test262Error('#2: var object = {valueOf: function() {return 0}, toString: function() {return {}}}; String(object) === "0". Actual: ' + (String(object)));
|
||||
}
|
||||
|
|
|
@ -9,15 +9,15 @@ description: NaN convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(NaN) !== "NaN") {
|
||||
$ERROR('#1: String(NaN) === Not-a-Number Actual: ' + (String(NaN)));
|
||||
throw new Test262Error('#1: String(NaN) === Not-a-Number Actual: ' + (String(NaN)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(Number.NaN) !== "NaN") {
|
||||
$ERROR('#2: String(Number.NaN) === Not-a-Number Actual: ' + (String(Number.NaN)));
|
||||
throw new Test262Error('#2: String(Number.NaN) === Not-a-Number Actual: ' + (String(Number.NaN)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(Number("asasa")) !== "NaN") {
|
||||
$ERROR('#3: String(Number("asasa")) === Not-a-Number Actual: ' + (String(Number("asasa"))));
|
||||
throw new Test262Error('#3: String(Number("asasa")) === Not-a-Number Actual: ' + (String(Number("asasa"))));
|
||||
}
|
||||
|
|
|
@ -15,45 +15,45 @@ description: Various float numbers convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(1.2345) !== "1.2345") {
|
||||
$ERROR('#1: String(1.2345) === "1.2345". Actual: ' + (String(1.2345)));
|
||||
throw new Test262Error('#1: String(1.2345) === "1.2345". Actual: ' + (String(1.2345)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(1.234567890) !== "1.23456789") {
|
||||
$ERROR('#2: String(1.234567890) === "1.23456789". Actual: ' + (String(1.234567890)));
|
||||
throw new Test262Error('#2: String(1.234567890) === "1.23456789". Actual: ' + (String(1.234567890)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(0.12345) !== "0.12345") {
|
||||
$ERROR('#3: String(0.12345) === "0.12345". Actual: ' + (String(0.12345)));
|
||||
throw new Test262Error('#3: String(0.12345) === "0.12345". Actual: ' + (String(0.12345)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String(.012345) !== "0.012345") {
|
||||
$ERROR('#4: String(.012345) === "0.012345". Actual: ' + (String(.012345)));
|
||||
throw new Test262Error('#4: String(.012345) === "0.012345". Actual: ' + (String(.012345)));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String(.0012345) !== "0.0012345") {
|
||||
$ERROR('#5: String(.0012345) === "0.0012345". Actual: ' + (String(.0012345)));
|
||||
throw new Test262Error('#5: String(.0012345) === "0.0012345". Actual: ' + (String(.0012345)));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String(.00012345) !== "0.00012345") {
|
||||
$ERROR('#6: String(.00012345) === "0.00012345". Actual: ' + (String(.00012345)));
|
||||
throw new Test262Error('#6: String(.00012345) === "0.00012345". Actual: ' + (String(.00012345)));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String(.000012345) !== "0.000012345") {
|
||||
$ERROR('#7: String(.000012345) === "0.000012345". Actual: ' + (String(.000012345)));
|
||||
throw new Test262Error('#7: String(.000012345) === "0.000012345". Actual: ' + (String(.000012345)));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String(.0000012345) !== "0.0000012345") {
|
||||
$ERROR('#8: String(.0000012345) === "0.0000012345". Actual: ' + (String(.0000012345)));
|
||||
throw new Test262Error('#8: String(.0000012345) === "0.0000012345". Actual: ' + (String(.0000012345)));
|
||||
}
|
||||
|
||||
// CHECK#9
|
||||
if (String(.00000012345) !== "1.2345e-7") {
|
||||
$ERROR('#9: String(.00000012345) === "1.2345e-7". Actual: ' + (String(.00000012345)));
|
||||
throw new Test262Error('#9: String(.00000012345) === "1.2345e-7". Actual: ' + (String(.00000012345)));
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: +0 and -0 convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(+0) !== "0") {
|
||||
$ERROR('#1: String(+0) === "0". Actual: ' + (String(+0)));
|
||||
throw new Test262Error('#1: String(+0) === "0". Actual: ' + (String(+0)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(-0) !== "0") {
|
||||
$ERROR('#2: String(-0) === "0". Actual: ' + (String(-0)));
|
||||
throw new Test262Error('#2: String(-0) === "0". Actual: ' + (String(-0)));
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@ description: -1234567890 convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(-1234567890) !== "-1234567890") {
|
||||
$ERROR('#1: String(-1234567890) === "-1234567890". Actual: ' + (String(-1234567890)));
|
||||
throw new Test262Error('#1: String(-1234567890) === "-1234567890". Actual: ' + (String(-1234567890)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if ("-" + String(-(-1234567890)) !== "-1234567890") {
|
||||
$ERROR('#2: "-"+String(-(-1234567890)) === "-1234567890". Actual: ' + ("-" + String(-(-1234567890))));
|
||||
throw new Test262Error('#2: "-"+String(-(-1234567890)) === "-1234567890". Actual: ' + ("-" + String(-(-1234567890))));
|
||||
}
|
||||
|
|
|
@ -9,20 +9,20 @@ description: +/-Infinity convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(Infinity) !== "Infinity") {
|
||||
$ERROR('#1: String(Infinity) === "Infinity". Actual: ' + (String(Infinity)));
|
||||
throw new Test262Error('#1: String(Infinity) === "Infinity". Actual: ' + (String(Infinity)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(Number.POSITIVE_INFINITY) !== "Infinity") {
|
||||
$ERROR('#2: String(Number.POSITIVE_INFINITY) === "Infinity". Actual: ' + (String(Number.POSITIVE_INFINITY)));
|
||||
throw new Test262Error('#2: String(Number.POSITIVE_INFINITY) === "Infinity". Actual: ' + (String(Number.POSITIVE_INFINITY)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(-Infinity) !== "-Infinity") {
|
||||
$ERROR('#3: String(-Infinity) === "-Infinity". Actual: ' + (String(-Infinity)));
|
||||
throw new Test262Error('#3: String(-Infinity) === "-Infinity". Actual: ' + (String(-Infinity)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String(Number.NEGATIVE_INFINITY) !== "-Infinity") {
|
||||
$ERROR('#4: String(Number.NEGATIVE_INFINITY) === "-Infinity". Actual: ' + (String(Number.NEGATIVE_INFINITY)));
|
||||
throw new Test262Error('#4: String(Number.NEGATIVE_INFINITY) === "-Infinity". Actual: ' + (String(Number.NEGATIVE_INFINITY)));
|
||||
}
|
||||
|
|
|
@ -14,80 +14,80 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String(1) !== "1") {
|
||||
$ERROR('#1: String(1) === "1". Actual: ' + (String(1)));
|
||||
throw new Test262Error('#1: String(1) === "1". Actual: ' + (String(1)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(10) !== "10") {
|
||||
$ERROR('#2: String(10) === "10". Actual: ' + (String(10)));
|
||||
throw new Test262Error('#2: String(10) === "10". Actual: ' + (String(10)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(100) !== "100") {
|
||||
$ERROR('#3: String(100) === "100". Actual: ' + (String(100)));
|
||||
throw new Test262Error('#3: String(100) === "100". Actual: ' + (String(100)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String(100000000000000000000) !== "100000000000000000000") {
|
||||
$ERROR('#4: String(100000000000000000000) === "100000000000000000000". Actual: ' + (String(100000000000000000000)));
|
||||
throw new Test262Error('#4: String(100000000000000000000) === "100000000000000000000". Actual: ' + (String(100000000000000000000)));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String(1e20) !== "100000000000000000000") {
|
||||
$ERROR('#5: String(1e20) === "100000000000000000000". Actual: ' + (String(1e20)));
|
||||
throw new Test262Error('#5: String(1e20) === "100000000000000000000". Actual: ' + (String(1e20)));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String(12345) !== "12345") {
|
||||
$ERROR('#6: String(12345) === "12345". Actual: ' + (String(12345)));
|
||||
throw new Test262Error('#6: String(12345) === "12345". Actual: ' + (String(12345)));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String(12345000) !== "12345000") {
|
||||
$ERROR('#7: String(12345000) === "12345000". Actual: ' + (String(12345000)));
|
||||
throw new Test262Error('#7: String(12345000) === "12345000". Actual: ' + (String(12345000)));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String(-1) !== "-1") {
|
||||
$ERROR('#8: String(-1) === "-1". Actual: ' + (String(-1)));
|
||||
throw new Test262Error('#8: String(-1) === "-1". Actual: ' + (String(-1)));
|
||||
}
|
||||
|
||||
// CHECK#9
|
||||
if (String(-10) !== "-10") {
|
||||
$ERROR('#9: String(-10) === "-10". Actual: ' + (String(-10)));
|
||||
throw new Test262Error('#9: String(-10) === "-10". Actual: ' + (String(-10)));
|
||||
}
|
||||
|
||||
// CHECK#10
|
||||
if (String(-100) !== "-100") {
|
||||
$ERROR('#3: String(-100) === "-100". Actual: ' + (String(-100)));
|
||||
throw new Test262Error('#3: String(-100) === "-100". Actual: ' + (String(-100)));
|
||||
}
|
||||
|
||||
// CHECK#10
|
||||
if (String(-100000000000000000000) !== "-100000000000000000000") {
|
||||
$ERROR('#10: String(-100000000000000000000) === "-100000000000000000000". Actual: ' + (String(-100000000000000000000)));
|
||||
throw new Test262Error('#10: String(-100000000000000000000) === "-100000000000000000000". Actual: ' + (String(-100000000000000000000)));
|
||||
}
|
||||
|
||||
// CHECK#11
|
||||
if (String(-1e20) !== "-100000000000000000000") {
|
||||
$ERROR('#11: String(-1e20) === "-100000000000000000000". Actual: ' + (String(-1e20)));
|
||||
throw new Test262Error('#11: String(-1e20) === "-100000000000000000000". Actual: ' + (String(-1e20)));
|
||||
}
|
||||
|
||||
// CHECK#12
|
||||
if (String(-12345) !== "-12345") {
|
||||
$ERROR('#12: String(-12345) === "-12345". Actual: ' + (String(-12345)));
|
||||
throw new Test262Error('#12: String(-12345) === "-12345". Actual: ' + (String(-12345)));
|
||||
}
|
||||
|
||||
// CHECK#13
|
||||
if (String(-12345000) !== "-12345000") {
|
||||
$ERROR('#13: String(-12345000) === "-12345000". Actual: ' + (String(-12345000)));
|
||||
throw new Test262Error('#13: String(-12345000) === "-12345000". Actual: ' + (String(-12345000)));
|
||||
}
|
||||
|
||||
// CHECK#14
|
||||
if (String(1E20) !== "100000000000000000000") {
|
||||
$ERROR('#14: String(1E20) === "100000000000000000000". Actual: ' + (String(1E20)));
|
||||
throw new Test262Error('#14: String(1E20) === "100000000000000000000". Actual: ' + (String(1E20)));
|
||||
}
|
||||
|
||||
// CHECK#15
|
||||
if (String(-1E20) !== "-100000000000000000000") {
|
||||
$ERROR('#15: String(-1E20) === "-100000000000000000000". Actual: ' + (String(-1E20)));
|
||||
throw new Test262Error('#15: String(-1E20) === "-100000000000000000000". Actual: ' + (String(-1E20)));
|
||||
}
|
||||
|
|
|
@ -15,10 +15,10 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String(1.0000001) !== "1.0000001") {
|
||||
$ERROR('#1: String(1.0000001) === "1.0000001". Actual: ' + (String(1.0000001)));
|
||||
throw new Test262Error('#1: String(1.0000001) === "1.0000001". Actual: ' + (String(1.0000001)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(-1.0000001) !== "-1.0000001") {
|
||||
$ERROR('#2: String(-1.0000001) === "-1.0000001". Actual: ' + (String(-1.0000001)));
|
||||
throw new Test262Error('#2: String(-1.0000001) === "-1.0000001". Actual: ' + (String(-1.0000001)));
|
||||
}
|
||||
|
|
|
@ -13,40 +13,40 @@ description: Various float numbers convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(0.1) !== "0.1") {
|
||||
$ERROR('#1: String(0.1) === "0.1". Actual: ' + (String(0.1)));
|
||||
throw new Test262Error('#1: String(0.1) === "0.1". Actual: ' + (String(0.1)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(0.000001) !== "0.000001") {
|
||||
$ERROR('#2: String(0.000001) === "0.000001". Actual: ' + (String(0.000001)));
|
||||
throw new Test262Error('#2: String(0.000001) === "0.000001". Actual: ' + (String(0.000001)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(1e-6) !== "0.000001") {
|
||||
$ERROR('#3: String(1e-6) === "0.000001". Actual: ' + (String(1e-6)));
|
||||
throw new Test262Error('#3: String(1e-6) === "0.000001". Actual: ' + (String(1e-6)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String(1E-6) !== "0.000001") {
|
||||
$ERROR('#4: String(1E-6) === "0.000001". Actual: ' + (String(1E-6)));
|
||||
throw new Test262Error('#4: String(1E-6) === "0.000001". Actual: ' + (String(1E-6)));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String(-0.1) !== "-0.1") {
|
||||
$ERROR('#5: String(-0.1) === "-0.1". Actual: ' + (String(-0.1)));
|
||||
throw new Test262Error('#5: String(-0.1) === "-0.1". Actual: ' + (String(-0.1)));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String(-0.000001) !== "-0.000001") {
|
||||
$ERROR('#6: String(-0.000001) === "-0.000001". Actual: ' + (String(-0.000001)));
|
||||
throw new Test262Error('#6: String(-0.000001) === "-0.000001". Actual: ' + (String(-0.000001)));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String(-1e-6) !== "-0.000001") {
|
||||
$ERROR('#7: String(-1e-6) === "0.000001". Actual: ' + (String(-1e-6)));
|
||||
throw new Test262Error('#7: String(-1e-6) === "0.000001". Actual: ' + (String(-1e-6)));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String(-1E-6) !== "-0.000001") {
|
||||
$ERROR('#8: String(-1E-6) === "0.000001". Actual: ' + (String(-1E-6)));
|
||||
throw new Test262Error('#8: String(-1E-6) === "0.000001". Actual: ' + (String(-1E-6)));
|
||||
}
|
||||
|
|
|
@ -13,60 +13,60 @@ description: Various big numbers convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(1000000000000000000000) !== "1e+21") {
|
||||
$ERROR('#1: String(1000000000000000000000) === "1e+21". Actual: ' + (String(1000000000000000000000)));
|
||||
throw new Test262Error('#1: String(1000000000000000000000) === "1e+21". Actual: ' + (String(1000000000000000000000)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(10000000000000000000000) !== "1e+22") {
|
||||
$ERROR('#2: String(10000000000000000000000) === "1e+22". Actual: ' + (String(10000000000000000000000)));
|
||||
throw new Test262Error('#2: String(10000000000000000000000) === "1e+22". Actual: ' + (String(10000000000000000000000)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(1e21) !== "1e+21") {
|
||||
$ERROR('#3: String(1e21) === "1e+21". Actual: ' + (String(1e21)));
|
||||
throw new Test262Error('#3: String(1e21) === "1e+21". Actual: ' + (String(1e21)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String(1.0e22) !== "1e+22") {
|
||||
$ERROR('#4: String(1.0e22) === "1e+22". Actual: ' + (String(1.0e22)));
|
||||
throw new Test262Error('#4: String(1.0e22) === "1e+22". Actual: ' + (String(1.0e22)));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String(1E21) !== "1e+21") {
|
||||
$ERROR('#5: String(1E21) === "1e+21". Actual: ' + (String(1E21)));
|
||||
throw new Test262Error('#5: String(1E21) === "1e+21". Actual: ' + (String(1E21)));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String(1.0E22) !== "1e+22") {
|
||||
$ERROR('#6: String(1.0E22) === "1e+22". Actual: ' + (String(1.0E22)));
|
||||
throw new Test262Error('#6: String(1.0E22) === "1e+22". Actual: ' + (String(1.0E22)));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String(-1000000000000000000000) !== "-1e+21") {
|
||||
$ERROR('#7: String(-1000000000000000000000) === "-1e+21". Actual: ' + (String(-1000000000000000000000)));
|
||||
throw new Test262Error('#7: String(-1000000000000000000000) === "-1e+21". Actual: ' + (String(-1000000000000000000000)));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String(-10000000000000000000000) !== "-1e+22") {
|
||||
$ERROR('#8: String(-10000000000000000000000) === "-1e+22". Actual: ' + (String(-10000000000000000000000)));
|
||||
throw new Test262Error('#8: String(-10000000000000000000000) === "-1e+22". Actual: ' + (String(-10000000000000000000000)));
|
||||
}
|
||||
|
||||
// CHECK#9
|
||||
if (String(-1e21) !== "-1e+21") {
|
||||
$ERROR('#9: String(-1e21) === "-1e+21". Actual: ' + (String(-1e21)));
|
||||
throw new Test262Error('#9: String(-1e21) === "-1e+21". Actual: ' + (String(-1e21)));
|
||||
}
|
||||
|
||||
// CHECK#10
|
||||
if (String(-1.0e22) !== "-1e+22") {
|
||||
$ERROR('#10: String(-1.0e22) === "-1e+22". Actual: ' + (String(-1.0e22)));
|
||||
throw new Test262Error('#10: String(-1.0e22) === "-1e+22". Actual: ' + (String(-1.0e22)));
|
||||
}
|
||||
|
||||
// CHECK#11
|
||||
if (String(-1E21) !== "-1e+21") {
|
||||
$ERROR('#11: String(-1E21) === "-1e+21". Actual: ' + (String(-1E21)));
|
||||
throw new Test262Error('#11: String(-1E21) === "-1e+21". Actual: ' + (String(-1E21)));
|
||||
}
|
||||
|
||||
// CHECK#12
|
||||
if (String(-1.0E22) !== "-1e+22") {
|
||||
$ERROR('#12: String(-1.0E22) === "-1e+22". Actual: ' + (String(-1.0E22)));
|
||||
throw new Test262Error('#12: String(-1.0E22) === "-1e+22". Actual: ' + (String(-1.0E22)));
|
||||
}
|
||||
|
|
|
@ -15,60 +15,60 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String(0.0000001) !== "1e-7") {
|
||||
$ERROR('#1: String(0.0000001) === "1e-7". Actual: ' + (String(0.0000001)));
|
||||
throw new Test262Error('#1: String(0.0000001) === "1e-7". Actual: ' + (String(0.0000001)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(0.000000000100000000000) !== "1e-10") {
|
||||
$ERROR('#2: String(0.000000000100000000000) === "1e-10". Actual: ' + (String(0.000000000100000000000)));
|
||||
throw new Test262Error('#2: String(0.000000000100000000000) === "1e-10". Actual: ' + (String(0.000000000100000000000)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(1e-7) !== "1e-7") {
|
||||
$ERROR('#3: String(1e-7) === "1e-7". Actual: ' + (String(1e-7)));
|
||||
throw new Test262Error('#3: String(1e-7) === "1e-7". Actual: ' + (String(1e-7)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String(1.0e-10) !== "1e-10") {
|
||||
$ERROR('#4: String(1.0e-10) === "1e-10". Actual: ' + (String(1.0e-10)));
|
||||
throw new Test262Error('#4: String(1.0e-10) === "1e-10". Actual: ' + (String(1.0e-10)));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String(1E-7) !== "1e-7") {
|
||||
$ERROR('#5: String(1E-7) === "1e-7". Actual: ' + (String(1E-7)));
|
||||
throw new Test262Error('#5: String(1E-7) === "1e-7". Actual: ' + (String(1E-7)));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String(1.0E-10) !== "1e-10") {
|
||||
$ERROR('#6: String(1.0E-10) === "1e-10". Actual: ' + (String(1.0E-10)));
|
||||
throw new Test262Error('#6: String(1.0E-10) === "1e-10". Actual: ' + (String(1.0E-10)));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String(-0.0000001) !== "-1e-7") {
|
||||
$ERROR('#7: String(-0.0000001) === "1e-7". Actual: ' + (String(-0.0000001)));
|
||||
throw new Test262Error('#7: String(-0.0000001) === "1e-7". Actual: ' + (String(-0.0000001)));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String(-0.000000000100000000000) !== "-1e-10") {
|
||||
$ERROR('#8: String(-0.000000000100000000000) === "1e-10". Actual: ' + (String(-0.000000000100000000000)));
|
||||
throw new Test262Error('#8: String(-0.000000000100000000000) === "1e-10". Actual: ' + (String(-0.000000000100000000000)));
|
||||
}
|
||||
|
||||
// CHECK#9
|
||||
if (String(-1e-7) !== "-1e-7") {
|
||||
$ERROR('#9: String(-1e-7) === "-1e-7". Actual: ' + (String(-1e-7)));
|
||||
throw new Test262Error('#9: String(-1e-7) === "-1e-7". Actual: ' + (String(-1e-7)));
|
||||
}
|
||||
|
||||
// CHECK#10
|
||||
if (String(-1.0e-10) !== "-1e-10") {
|
||||
$ERROR('#10: String(-1.0e-10) === "-1e-10". Actual: ' + (String(-1.0e-10)));
|
||||
throw new Test262Error('#10: String(-1.0e-10) === "-1e-10". Actual: ' + (String(-1.0e-10)));
|
||||
}
|
||||
|
||||
// CHECK#11
|
||||
if (String(-1E-7) !== "-1e-7") {
|
||||
$ERROR('#11: String(-1E-7) === "-1e-7". Actual: ' + (String(-1E-7)));
|
||||
throw new Test262Error('#11: String(-1E-7) === "-1e-7". Actual: ' + (String(-1E-7)));
|
||||
}
|
||||
|
||||
// CHECK#12
|
||||
if (String(-1.0E-10) !== "-1e-10") {
|
||||
$ERROR('#12: String(-1.0E-10) === "-1e-10". Actual: ' + (String(-1.0E-10)));
|
||||
throw new Test262Error('#12: String(-1.0E-10) === "-1e-10". Actual: ' + (String(-1.0E-10)));
|
||||
}
|
||||
|
|
|
@ -11,15 +11,15 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String(undefined) !== "undefined") {
|
||||
$ERROR('#1: String(undefined) === "undefined". Actual: ' + (String(undefined)));
|
||||
throw new Test262Error('#1: String(undefined) === "undefined". Actual: ' + (String(undefined)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(void 0) !== "undefined") {
|
||||
$ERROR('#2: String(void 0) === "undefined". Actual: ' + (String(void 0)));
|
||||
throw new Test262Error('#2: String(void 0) === "undefined". Actual: ' + (String(void 0)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(eval("var x")) !== "undefined") {
|
||||
$ERROR('#3: String(eval("var x")) === "undefined" . Actual: ' + (String(eval("var x"))));
|
||||
throw new Test262Error('#3: String(eval("var x")) === "undefined" . Actual: ' + (String(eval("var x"))));
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: null convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(null) !== "null") {
|
||||
$ERROR('#1: String(null) === "null". Actual: ' + (String(null)));
|
||||
throw new Test262Error('#1: String(null) === "null". Actual: ' + (String(null)));
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@ description: True and false convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(false) !== "false") {
|
||||
$ERROR('#1: String(false) === "false". Actual: ' + (String(false)));
|
||||
throw new Test262Error('#1: String(false) === "false". Actual: ' + (String(false)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(true) !== "true") {
|
||||
$ERROR('#2: String(true) === "true". Actual: ' + (String(true)));
|
||||
throw new Test262Error('#2: String(true) === "true". Actual: ' + (String(true)));
|
||||
}
|
||||
|
|
|
@ -12,11 +12,11 @@ description: Some strings convert to String with explicit transformation
|
|||
// CHECK#1
|
||||
var x1 = "abc";
|
||||
if (String(x1) !== x1) {
|
||||
$ERROR('#1: String("abc") === "abc". Actual: ' + (String("abc")));
|
||||
throw new Test262Error('#1: String("abc") === "abc". Actual: ' + (String("abc")));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
var x2 = "abc";
|
||||
if (typeof String(x2) !== typeof x2) {
|
||||
$ERROR('#2: typeof String("abc") === "string". Actual: ' + (typeof String("abc")));
|
||||
throw new Test262Error('#2: typeof String("abc") === "string". Actual: ' + (typeof String("abc")));
|
||||
}
|
||||
|
|
|
@ -11,52 +11,52 @@ description: Some objects convert to String by explicit transformation
|
|||
|
||||
// CHECK#1
|
||||
if (String(new Number()) !== "0") {
|
||||
$ERROR('#1: String(new Number()) === "0". Actual: ' + (String(new Number())));
|
||||
throw new Test262Error('#1: String(new Number()) === "0". Actual: ' + (String(new Number())));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String(new Number(0)) !== "0") {
|
||||
$ERROR('#2: String(new Number(0)) === "0". Actual: ' + (String(new Number(0))));
|
||||
throw new Test262Error('#2: String(new Number(0)) === "0". Actual: ' + (String(new Number(0))));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String(new Number(Number.NaN)) !== "NaN") {
|
||||
$ERROR('#3: String(new Number(Number.NaN)) === Not-a-Number. Actual: ' + (String(new Number(Number.NaN))));
|
||||
throw new Test262Error('#3: String(new Number(Number.NaN)) === Not-a-Number. Actual: ' + (String(new Number(Number.NaN))));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String(new Number(null)) !== "0") {
|
||||
$ERROR('#4: String(new Number(null)) === "0". Actual: ' + (String(new Number(null))));
|
||||
throw new Test262Error('#4: String(new Number(null)) === "0". Actual: ' + (String(new Number(null))));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String(new Number(void 0)) !== "NaN") {
|
||||
$ERROR('#5: String(new Number(void 0)) === Not-a-Number. Actual: ' + (String(new Number(void 0))));
|
||||
throw new Test262Error('#5: String(new Number(void 0)) === Not-a-Number. Actual: ' + (String(new Number(void 0))));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String(new Number(true)) !== "1") {
|
||||
$ERROR('#6: String(new Number(true)) === "1". Actual: ' + (String(new Number(true))));
|
||||
throw new Test262Error('#6: String(new Number(true)) === "1". Actual: ' + (String(new Number(true))));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String(new Number(false)) !== "0") {
|
||||
$ERROR('#7: String(new Number(false)) === "0". Actual: ' + (String(new Number(false))));
|
||||
throw new Test262Error('#7: String(new Number(false)) === "0". Actual: ' + (String(new Number(false))));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String(new Boolean(true)) !== "true") {
|
||||
$ERROR('#8: String(new Boolean(true)) === "true". Actual: ' + (String(new Boolean(true))));
|
||||
throw new Test262Error('#8: String(new Boolean(true)) === "true". Actual: ' + (String(new Boolean(true))));
|
||||
}
|
||||
|
||||
// CHECK#9
|
||||
if (String(new Boolean(false)) !== "false") {
|
||||
$ERROR('#9: Number(new Boolean(false)) === "false". Actual: ' + (Number(new Boolean(false))));
|
||||
throw new Test262Error('#9: Number(new Boolean(false)) === "false". Actual: ' + (Number(new Boolean(false))));
|
||||
}
|
||||
|
||||
// CHECK#10
|
||||
if (String(new Array(2, 4, 8, 16, 32)) !== "2,4,8,16,32") {
|
||||
$ERROR('#10: String(new Array(2,4,8,16,32)) === "2,4,8,16,32". Actual: ' + (String(new Array(2, 4, 8, 16, 32))));
|
||||
throw new Test262Error('#10: String(new Array(2,4,8,16,32)) === "2,4,8,16,32". Actual: ' + (String(new Array(2, 4, 8, 16, 32))));
|
||||
}
|
||||
|
||||
// CHECK#11
|
||||
|
@ -73,7 +73,7 @@ var myobj1 = {
|
|||
};
|
||||
|
||||
if (String(myobj1) !== "67890") {
|
||||
$ERROR("#11: String(myobj) calls ToPrimitive with hint String");
|
||||
throw new Test262Error("#11: String(myobj) calls ToPrimitive with hint String");
|
||||
}
|
||||
|
||||
// CHECK#12
|
||||
|
@ -90,7 +90,7 @@ var myobj2 = {
|
|||
};
|
||||
|
||||
if (String(myobj2) !== "[object MyObj]") {
|
||||
$ERROR("#12: String(myobj) calls ToPrimitive with hint String");
|
||||
throw new Test262Error("#12: String(myobj) calls ToPrimitive with hint String");
|
||||
}
|
||||
|
||||
// CHECK#13
|
||||
|
@ -104,5 +104,5 @@ var myobj3 = {
|
|||
};
|
||||
|
||||
if (String(myobj3) !== "[object Object]") {
|
||||
$ERROR("#13: String(myobj) calls ToPrimitive with hint String");
|
||||
throw new Test262Error("#13: String(myobj) calls ToPrimitive with hint String");
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Checking String.fromCharCode.length
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (typeof String.fromCharCode !== "function") {
|
||||
$ERROR('#1: typeof String.fromCharCode === "function". Actual: typeof String.fromCharCode ===' + typeof String.fromCharCode);
|
||||
throw new Test262Error('#1: typeof String.fromCharCode === "function". Actual: typeof String.fromCharCode ===' + typeof String.fromCharCode);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -18,7 +18,7 @@ if (typeof String.fromCharCode !== "function") {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (!(String.hasOwnProperty("fromCharCode"))) {
|
||||
$ERROR('#2: String.hasOwnProperty("fromCharCode") return true. Actual: ' + String.hasOwnProperty("fromCharCode"));
|
||||
throw new Test262Error('#2: String.hasOwnProperty("fromCharCode") return true. Actual: ' + String.hasOwnProperty("fromCharCode"));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -26,7 +26,7 @@ if (!(String.hasOwnProperty("fromCharCode"))) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (String.fromCharCode.length !== 1) {
|
||||
$ERROR('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ===' + String.fromCharCode.length);
|
||||
throw new Test262Error('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ===' + String.fromCharCode.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Call String.fromCharCode()
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (String.fromCharCode() !== "") {
|
||||
$ERROR('#1: String.fromCharCode () returns empty string. Actual: ' + String.fromCharCode());
|
||||
throw new Test262Error('#1: String.fromCharCode () returns empty string. Actual: ' + String.fromCharCode());
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Call String.fromCharCode(65,66,66,65)
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (String.fromCharCode(65, 66, 66, 65) !== "ABBA") {
|
||||
$ERROR('#1: String.fromCharCode(65,66,66,65) === "ABBA". Actual: String.fromCharCode(65,66,66,65) ===' + String.fromCharCode(65, 66, 66, 65));
|
||||
throw new Test262Error('#1: String.fromCharCode(65,66,66,65) === "ABBA". Actual: String.fromCharCode(65,66,66,65) ===' + String.fromCharCode(65, 66, 66, 65));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -16,7 +16,7 @@ delete String.fromCharCode;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__fcc__func(65, 66, 66, 65) !== "ABBA") {
|
||||
$ERROR('#1: __fcc__func = String.fromCharCode; delete String.fromCharCode; __fcc__func(65,66,66,65) === "ABBA". Actual: __fcc__func(65,66,66,65) ===' + __fcc__func(65, 66, 66, 65));
|
||||
throw new Test262Error('#1: __fcc__func = String.fromCharCode; delete String.fromCharCode; __fcc__func(65,66,66,65) === "ABBA". Actual: __fcc__func(65,66,66,65) ===' + __fcc__func(65, 66, 66, 65));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -15,7 +15,7 @@ delete String.fromCharCode;
|
|||
//CHECK#1
|
||||
try {
|
||||
var __obj = new __fcc__func(65, 66, 66, 65);
|
||||
$ERROR('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception');
|
||||
throw new Test262Error('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception');
|
||||
} catch (e) {
|
||||
if (e instanceof Test262Error) throw e;
|
||||
}
|
||||
|
|
|
@ -11,42 +11,42 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String.fromCharCode(Number.NaN).charCodeAt(0) !== +0) {
|
||||
$ERROR('#1.1: String.fromCharCode(Number.NaN).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.NaN).charCodeAt(0)));
|
||||
throw new Test262Error('#1.1: String.fromCharCode(Number.NaN).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.NaN).charCodeAt(0)));
|
||||
} else if (1 / String.fromCharCode(Number.NaN).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#1.2: String.fromCharCode(Number.NaN).charCodeAt(0) === +0. Actual: -0');
|
||||
throw new Test262Error('#1.2: String.fromCharCode(Number.NaN).charCodeAt(0) === +0. Actual: -0');
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String.fromCharCode(Number("abc")).charCodeAt(0) !== +0) {
|
||||
$ERROR('#2.1: String.fromCharCode(Number("abc")).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number("abc")).charCodeAt(0)));
|
||||
throw new Test262Error('#2.1: String.fromCharCode(Number("abc")).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number("abc")).charCodeAt(0)));
|
||||
} else if (1 / String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#2.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
|
||||
throw new Test262Error('#2.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String.fromCharCode(0).charCodeAt(0) !== +0) {
|
||||
$ERROR('#3.1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));
|
||||
throw new Test262Error('#3.1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));
|
||||
} else if (1 / String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#3.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
|
||||
throw new Test262Error('#3.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String.fromCharCode(-0).charCodeAt(0) !== +0) {
|
||||
$ERROR("#4.1: String.fromCharCode(-0).charCodeAt(0) === +0");
|
||||
throw new Test262Error("#4.1: String.fromCharCode(-0).charCodeAt(0) === +0");
|
||||
} else if (1 / String.fromCharCode(-0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR("#4.2: String.fromCharCode(-0).charCodeAt(0) === +0. Actual: -0");
|
||||
throw new Test262Error("#4.2: String.fromCharCode(-0).charCodeAt(0) === +0. Actual: -0");
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) !== +0) {
|
||||
$ERROR('#5.1: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0)));
|
||||
throw new Test262Error('#5.1: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0)));
|
||||
} else if (1 / String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#5.2: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === +0. Actual: -0');
|
||||
throw new Test262Error('#5.2: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === +0. Actual: -0');
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== +0) {
|
||||
$ERROR("#6.1: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0");
|
||||
throw new Test262Error("#6.1: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0");
|
||||
} else if (1 / String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR("#6.2: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0. Actual: -0");
|
||||
throw new Test262Error("#6.2: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0. Actual: -0");
|
||||
}
|
||||
|
|
|
@ -11,45 +11,45 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String.fromCharCode(0).charCodeAt(0) !== 0) {
|
||||
$ERROR('#1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));
|
||||
throw new Test262Error('#1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String.fromCharCode(1).charCodeAt(0) !== 1) {
|
||||
$ERROR('#2: String.fromCharCode(1).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1).charCodeAt(0)));
|
||||
throw new Test262Error('#2: String.fromCharCode(1).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String.fromCharCode(-1).charCodeAt(0) !== 65535) {
|
||||
$ERROR('#3: String.fromCharCode(-1).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1).charCodeAt(0)));
|
||||
throw new Test262Error('#3: String.fromCharCode(-1).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String.fromCharCode(65535).charCodeAt(0) !== 65535) {
|
||||
$ERROR('#4: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));
|
||||
throw new Test262Error('#4: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String.fromCharCode(65534).charCodeAt(0) !== 65534) {
|
||||
$ERROR('#5: String.fromCharCode(65534).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(65534).charCodeAt(0)));
|
||||
throw new Test262Error('#5: String.fromCharCode(65534).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(65534).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String.fromCharCode(65536).charCodeAt(0) !== 0) {
|
||||
$ERROR('#6: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));
|
||||
throw new Test262Error('#6: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String.fromCharCode(4294967295).charCodeAt(0) !== 65535) {
|
||||
$ERROR('#7: String.fromCharCode(4294967295).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(4294967295).charCodeAt(0)));
|
||||
throw new Test262Error('#7: String.fromCharCode(4294967295).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(4294967295).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String.fromCharCode(4294967294).charCodeAt(0) !== 65534) {
|
||||
$ERROR('#8: String.fromCharCode(4294967294).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(4294967294).charCodeAt(0)));
|
||||
throw new Test262Error('#8: String.fromCharCode(4294967294).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(4294967294).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#9
|
||||
if (String.fromCharCode(4294967296).charCodeAt(0) !== 0) {
|
||||
$ERROR('#9: String.fromCharCode(4294967296).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(4294967296).charCodeAt(0)));
|
||||
throw new Test262Error('#9: String.fromCharCode(4294967296).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(4294967296).charCodeAt(0)));
|
||||
}
|
||||
|
|
|
@ -11,60 +11,60 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String.fromCharCode(-32767).charCodeAt(0) !== 32769) {
|
||||
$ERROR('#1: String.fromCharCode(-32767).charCodeAt(0) === 32769. Actual: ' + (String.fromCharCode(-32767).charCodeAt(0)));
|
||||
throw new Test262Error('#1: String.fromCharCode(-32767).charCodeAt(0) === 32769. Actual: ' + (String.fromCharCode(-32767).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String.fromCharCode(-32768).charCodeAt(0) !== 32768) {
|
||||
$ERROR('#2: String.fromCharCode(-32768).charCodeAt(0) === 32768. Actual: ' + (String.fromCharCode(-32768).charCodeAt(0)));
|
||||
throw new Test262Error('#2: String.fromCharCode(-32768).charCodeAt(0) === 32768. Actual: ' + (String.fromCharCode(-32768).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (String.fromCharCode(-32769).charCodeAt(0) !== 32767) {
|
||||
$ERROR('#3: String.fromCharCode(-32769).charCodeAt(0) === 32767. Actual: ' + (String.fromCharCode(-32769).charCodeAt(0)));
|
||||
throw new Test262Error('#3: String.fromCharCode(-32769).charCodeAt(0) === 32767. Actual: ' + (String.fromCharCode(-32769).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#4
|
||||
if (String.fromCharCode(-65535).charCodeAt(0) !== 1) {
|
||||
$ERROR('#4: String.fromCharCode(-65535).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(-65535).charCodeAt(0)));
|
||||
throw new Test262Error('#4: String.fromCharCode(-65535).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(-65535).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#5
|
||||
if (String.fromCharCode(-65536).charCodeAt(0) !== 0) {
|
||||
$ERROR('#5: String.fromCharCode(-65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(-65536).charCodeAt(0)));
|
||||
throw new Test262Error('#5: String.fromCharCode(-65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(-65536).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#6
|
||||
if (String.fromCharCode(-65537).charCodeAt(0) !== 65535) {
|
||||
$ERROR('#6: String.fromCharCode(-65537).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-65537).charCodeAt(0)));
|
||||
throw new Test262Error('#6: String.fromCharCode(-65537).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-65537).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#7
|
||||
if (String.fromCharCode(65535).charCodeAt(0) !== 65535) {
|
||||
$ERROR('#7: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));
|
||||
throw new Test262Error('#7: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#8
|
||||
if (String.fromCharCode(65536).charCodeAt(0) !== 0) {
|
||||
$ERROR('#8: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));
|
||||
throw new Test262Error('#8: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#9
|
||||
if (String.fromCharCode(65537).charCodeAt(0) !== 1) {
|
||||
$ERROR('#9: String.fromCharCode(65537).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(65537).charCodeAt(0)));
|
||||
throw new Test262Error('#9: String.fromCharCode(65537).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(65537).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#10
|
||||
if (String.fromCharCode(131071).charCodeAt(0) !== 65535) {
|
||||
$ERROR('#10: String.fromCharCode(131071).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(131071).charCodeAt(0)));
|
||||
throw new Test262Error('#10: String.fromCharCode(131071).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(131071).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#11
|
||||
if (String.fromCharCode(131072).charCodeAt(0) !== 0) {
|
||||
$ERROR('#11: String.fromCharCode(131072).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(131072).charCodeAt(0)));
|
||||
throw new Test262Error('#11: String.fromCharCode(131072).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(131072).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#12
|
||||
if (String.fromCharCode(131073).charCodeAt(0) !== 1) {
|
||||
$ERROR('#12: String.fromCharCode(131073).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(131073).charCodeAt(0)));
|
||||
throw new Test262Error('#12: String.fromCharCode(131073).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(131073).charCodeAt(0)));
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: Type(x) is Boolean
|
|||
|
||||
// CHECK#1
|
||||
if (String.fromCharCode(new Boolean(true)).charCodeAt(0) !== 1) {
|
||||
$ERROR('#1: String.fromCharCode(new Boolean(true)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Boolean(true)).charCodeAt(0)));
|
||||
throw new Test262Error('#1: String.fromCharCode(new Boolean(true)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Boolean(true)).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String.fromCharCode(false).charCodeAt(0) !== 0) {
|
||||
$ERROR('#2: String.fromCharCode(false).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(false).charCodeAt(0)));
|
||||
throw new Test262Error('#2: String.fromCharCode(false).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(false).charCodeAt(0)));
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: Type(x) is Number
|
|||
|
||||
// CHECK#1
|
||||
if (String.fromCharCode(new Number(1)).charCodeAt(0) !== 1) {
|
||||
$ERROR('#1: String.fromCharCode(new Number(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Number(1)).charCodeAt(0)));
|
||||
throw new Test262Error('#1: String.fromCharCode(new Number(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Number(1)).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String.fromCharCode(-1.234).charCodeAt(0) !== 65535) {
|
||||
$ERROR('#2: String.fromCharCode(-1.234).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1.234).charCodeAt(0)));
|
||||
throw new Test262Error('#2: String.fromCharCode(-1.234).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1.234).charCodeAt(0)));
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: Type(x) is String
|
|||
|
||||
// CHECK#1
|
||||
if (String.fromCharCode(new String(1)).charCodeAt(0) !== 1) {
|
||||
$ERROR('#1: String.fromCharCode(new String(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new String(1)).charCodeAt(0)));
|
||||
throw new Test262Error('#1: String.fromCharCode(new String(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new String(1)).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String.fromCharCode("-1.234").charCodeAt(0) !== 65535) {
|
||||
$ERROR('#2: String.fromCharCode("-1.234").charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode("-1.234").charCodeAt(0)));
|
||||
throw new Test262Error('#2: String.fromCharCode("-1.234").charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode("-1.234").charCodeAt(0)));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (String.fromCharCode(object).charCodeAt(0) !== 1) {
|
||||
$ERROR('#1: var object = {valueOf: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
throw new Test262Error('#1: var object = {valueOf: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
|
@ -27,7 +27,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (String.fromCharCode(object).charCodeAt(0) !== 1) {
|
||||
$ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
throw new Test262Error('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
}
|
||||
|
||||
//CHECK#3
|
||||
|
@ -40,7 +40,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (String.fromCharCode(object).charCodeAt(0) !== 1) {
|
||||
$ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
throw new Test262Error('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
}
|
||||
|
||||
//CHECK#4
|
||||
|
@ -54,14 +54,14 @@ try {
|
|||
}
|
||||
};
|
||||
if (String.fromCharCode(object).charCodeAt(0) !== 1) {
|
||||
$ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
throw new Test262Error('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
if (e === "error") {
|
||||
$ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; object not throw "error"');
|
||||
throw new Test262Error('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; object not throw "error"');
|
||||
} else {
|
||||
$ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; object not throw Error. Actual: ' + (e));
|
||||
throw new Test262Error('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; object not throw Error. Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ var object = {
|
|||
}
|
||||
};
|
||||
if (String.fromCharCode(object).charCodeAt(0) !== 1) {
|
||||
$ERROR('#5: var object = {toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
throw new Test262Error('#5: var object = {toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
}
|
||||
|
||||
//CHECK#6
|
||||
|
@ -85,7 +85,7 @@ var object = {
|
|||
}
|
||||
}
|
||||
if (String.fromCharCode(object).charCodeAt(0) !== 1) {
|
||||
$ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
throw new Test262Error('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
|
||||
}
|
||||
|
||||
//CHECK#7
|
||||
|
@ -99,11 +99,11 @@ try {
|
|||
}
|
||||
};
|
||||
object >>> 0;
|
||||
$ERROR('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (object >>> 0));
|
||||
throw new Test262Error('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (object >>> 0));
|
||||
}
|
||||
catch (e) {
|
||||
if (e !== "error") {
|
||||
$ERROR('#7.2: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (e));
|
||||
throw new Test262Error('#7.2: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,10 +118,10 @@ try {
|
|||
}
|
||||
};
|
||||
object >>> 0;
|
||||
$ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (object >>> 0));
|
||||
throw new Test262Error('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (object >>> 0));
|
||||
}
|
||||
catch (e) {
|
||||
if ((e instanceof TypeError) !== true) {
|
||||
$ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (e));
|
||||
throw new Test262Error('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@ description: >
|
|||
|
||||
// CHECK#1
|
||||
if (String.fromCharCode(1.2345).charCodeAt(0) !== 1) {
|
||||
$ERROR('#1: String.fromCharCode(1.2345).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1.2345).charCodeAt(0)));
|
||||
throw new Test262Error('#1: String.fromCharCode(1.2345).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1.2345).charCodeAt(0)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (String.fromCharCode(-5.4321).charCodeAt(0) !== 65531) {
|
||||
$ERROR('#2: String.fromCharCode(-5.4321).charCodeAt(0) === 65531. Actual: ' + (String.fromCharCode(-5.4321).charCodeAt(0)));
|
||||
throw new Test262Error('#2: String.fromCharCode(-5.4321).charCodeAt(0) === 65531. Actual: ' + (String.fromCharCode(-5.4321).charCodeAt(0)));
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Checking String.hasOwnProperty('prototype')
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(String.hasOwnProperty('prototype'))) {
|
||||
$ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
throw new Test262Error('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Checking if enumerating the String.prototype property fails
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#0
|
||||
if (!(String.hasOwnProperty('prototype'))) {
|
||||
$ERROR('#0: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
throw new Test262Error('#0: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -19,7 +19,7 @@ if (!(String.hasOwnProperty('prototype'))) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CHECK#1
|
||||
if (String.propertyIsEnumerable('prototype')) {
|
||||
$ERROR('#1: String.propertyIsEnumerable(\'prototype\') return false. Actual: ' + String.propertyIsEnumerable('prototype'));
|
||||
throw new Test262Error('#1: String.propertyIsEnumerable(\'prototype\') return false. Actual: ' + String.propertyIsEnumerable('prototype'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -34,7 +34,7 @@ for (var p in String) {
|
|||
}
|
||||
|
||||
if (count !== 0) {
|
||||
$ERROR('#2: count=0; for (p in String){ if (p==="prototype") count++;}; count === 0. Actual: count ===' + count);
|
||||
throw new Test262Error('#2: count=0; for (p in String){ if (p==="prototype") count++;}; count === 0. Actual: count ===' + count);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -11,7 +11,7 @@ includes: [propertyHelper.js]
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(String.hasOwnProperty('prototype'))) {
|
||||
$ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
throw new Test262Error('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ verifyNotConfigurable(String, "prototype");
|
|||
//CHECK#2
|
||||
try {
|
||||
if ((delete String.prototype) !== false) {
|
||||
$ERROR('#2: String.prototype has the attribute DontDelete');
|
||||
throw new Test262Error('#2: String.prototype has the attribute DontDelete');
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof Test262Error) throw e;
|
||||
|
@ -34,7 +34,7 @@ try {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
if (!(String.hasOwnProperty('prototype'))) {
|
||||
$ERROR('#3: delete String.prototype; String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
throw new Test262Error('#3: delete String.prototype; String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -11,7 +11,7 @@ includes: [propertyHelper.js]
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(String.hasOwnProperty('prototype'))) {
|
||||
$ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
throw new Test262Error('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -25,7 +25,7 @@ verifyNotWritable(String, "prototype", null, function() {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (String.prototype !== __obj) {
|
||||
$ERROR('#2: __obj = String.prototype; String.prototype = function(){return "shifted";}; String.prototype === __obj. Actual: String.prototype ===' + String.prototype);
|
||||
throw new Test262Error('#2: __obj = String.prototype; String.prototype = function(){return "shifted";}; String.prototype === __obj. Actual: String.prototype ===' + String.prototype);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -16,7 +16,7 @@ delete String.prototype.toString;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (String.prototype.toString() !== "[object " + "String" + "]") {
|
||||
$ERROR('#1: delete String.prototype.toString; String.prototype.toString() === "[object "+"String"+"]". Actual: String.prototype.toString() ===' + String.prototype.toString());
|
||||
throw new Test262Error('#1: delete String.prototype.toString; String.prototype.toString() === "[object "+"String"+"]". Actual: String.prototype.toString() ===' + String.prototype.toString());
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Checking String.prototype
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (String.prototype != "") {
|
||||
$ERROR('#1: String.prototype =="". Actual: String.prototype ==' + String.prototype);
|
||||
throw new Test262Error('#1: String.prototype =="". Actual: String.prototype ==' + String.prototype);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -12,7 +12,7 @@ description: Checking Object.prototype.isPrototypeOf(String.prototype)
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(Object.prototype.isPrototypeOf(String.prototype))) {
|
||||
$ERROR('#1: Object.prototype.isPrototypeOf(String.prototype) return true. Actual: ' + Object.prototype.isPrototypeOf(String.prototype));
|
||||
throw new Test262Error('#1: Object.prototype.isPrototypeOf(String.prototype) return true. Actual: ' + Object.prototype.isPrototypeOf(String.prototype));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,7 +22,7 @@ delete String.prototype.toString;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (String.prototype.toString() != "[object " + "String" + "]") {
|
||||
$ERROR('#2: delete String.prototype.toString; String.prototype.toString() == "[object "+"String"+"]". Actual: String.prototype.toString() ==' + String.prototype.toString());
|
||||
throw new Test262Error('#2: delete String.prototype.toString; String.prototype.toString() == "[object "+"String"+"]". Actual: String.prototype.toString() ==' + String.prototype.toString());
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -20,7 +20,7 @@ var __instance = new __FACTORY;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__instance.charAt(eval("1"), true, null, {}) !== "i") {
|
||||
$ERROR('#1: __instance.charAt(eval("1"),true,null,{})=== "i". Actual: ' + __instance.charAt(eval("1"), true, null, {}));
|
||||
throw new Test262Error('#1: __instance.charAt(eval("1"),true,null,{})=== "i". Actual: ' + __instance.charAt(eval("1"), true, null, {}));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -13,7 +13,7 @@ includes: [propertyHelper.js]
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(String.prototype.charAt.hasOwnProperty('length'))) {
|
||||
$ERROR('#1: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.charAt.hasOwnProperty('length'));
|
||||
throw new Test262Error('#1: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.charAt.hasOwnProperty('length'));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -27,7 +27,7 @@ verifyNotWritable(String.prototype.charAt, "length", null, function() {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (String.prototype.charAt.length !== __obj) {
|
||||
$ERROR('#2: __obj = String.prototype.charAt.length; String.prototype.charAt.length = function(){return "shifted";}; String.prototype.charAt.length === __obj. Actual: ' + String.prototype.charAt.length);
|
||||
throw new Test262Error('#2: __obj = String.prototype.charAt.length; String.prototype.charAt.length = function(){return "shifted";}; String.prototype.charAt.length === __obj. Actual: ' + String.prototype.charAt.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -10,7 +10,7 @@ description: Checking String.prototype.charAt.length
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (!(String.prototype.charAt.hasOwnProperty("length"))) {
|
||||
$ERROR('#1: String.prototype.charAt.hasOwnProperty("length") return true. Actual: ' + String.prototype.charAt.hasOwnProperty("length"));
|
||||
throw new Test262Error('#1: String.prototype.charAt.hasOwnProperty("length") return true. Actual: ' + String.prototype.charAt.hasOwnProperty("length"));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -18,7 +18,7 @@ if (!(String.prototype.charAt.hasOwnProperty("length"))) {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
if (String.prototype.charAt.length !== 1) {
|
||||
$ERROR('#2: String.prototype.charAt.length === 1. Actual: ' + String.prototype.charAt.length);
|
||||
throw new Test262Error('#2: String.prototype.charAt.length === 1. Actual: ' + String.prototype.charAt.length);
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ __instance.charAt = String.prototype.charAt;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__instance.charAt(false) + __instance.charAt(true) !== "42") {
|
||||
$ERROR('#1: __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true) === "42". Actual: ' + __instance.charAt(false) + __instance.charAt(true));
|
||||
throw new Test262Error('#1: __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true) === "42". Actual: ' + __instance.charAt(false) + __instance.charAt(true));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ var __str = "lego";
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__str.charAt(__obj) !== "e") {
|
||||
$ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; __str.charAt(__obj) === "e". Actual: ' + __str.charAt(__obj));
|
||||
throw new Test262Error('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; __str.charAt(__obj) === "e". Actual: ' + __str.charAt(__obj));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -14,7 +14,7 @@ __instance.charAt = String.prototype.charAt;
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
if (__instance.charAt(false) + __instance.charAt(true) + __instance.charAt(true + 1) !== "fal") {
|
||||
$ERROR('#1: __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) === "fal". Actual: ' + __instance.charAt(false) + __instance.charAt(true) + __instance.charAt(true + 1));
|
||||
throw new Test262Error('#1: __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) === "fal". Actual: ' + __instance.charAt(false) + __instance.charAt(true) + __instance.charAt(true + 1));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -11,7 +11,7 @@ description: Call charAt() function without argument of string object
|
|||
//CHECK#1
|
||||
//since ToInteger() evaluates to 0 charAt() evaluates to charAt(0)
|
||||
if ("lego".charAt() !== "l") {
|
||||
$ERROR('#1: "lego".charAt() === "l". Actual: "lego".charAt() ===' + ("lego".charAt()));
|
||||
throw new Test262Error('#1: "lego".charAt() === "l". Actual: "lego".charAt() ===' + ("lego".charAt()));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -13,7 +13,7 @@ description: Call charAt() function with null argument of function object
|
|||
if (function() {
|
||||
return "lego"
|
||||
}().charAt(null) !== "l") {
|
||||
$ERROR('#1: function(){return "lego"}().charAt(null) === "l". Actual: function(){return "lego"}().charAt(null) ===' + function() {
|
||||
throw new Test262Error('#1: function(){return "lego"}().charAt(null) === "l". Actual: function(){return "lego"}().charAt(null) ===' + function() {
|
||||
return "lego"
|
||||
}().charAt(null));
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ description: >
|
|||
//CHECK#1
|
||||
//since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0)
|
||||
if (new String("lego").charAt(x) !== "l") {
|
||||
$ERROR('#1: var x; new String("lego").charAt(x) === "l". Actual: new String("lego").charAt(x) ===' + new String("lego").charAt(x));
|
||||
throw new Test262Error('#1: var x; new String("lego").charAt(x) === "l". Actual: new String("lego").charAt(x) ===' + new String("lego").charAt(x));
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue