built-ins/String/*: make all indentation consistent (depth & character) (#1430)

This commit is contained in:
Rick Waldron 2018-02-15 15:39:13 -05:00 committed by Leo Balter
parent af37c92af7
commit 19ca734bea
641 changed files with 3170 additions and 2333 deletions

View File

@ -11,8 +11,8 @@ description: >
properties properties
---*/ ---*/
var s = new String("hello world"); var s = new String("hello world");
s.foo = 1; s.foo = 1;
assert.sameValue(s["foo"], 1, 's["foo"]'); assert.sameValue(s["foo"], 1, 's["foo"]');

View File

@ -9,7 +9,7 @@ es5id: 15.5.5.5.2-1-2
description: String value supports bracket notation to lookup data properties description: String value supports bracket notation to lookup data properties
---*/ ---*/
var s = String("hello world"); var s = String("hello world");
assert.sameValue(s["foo"], undefined, 's["foo"]'); assert.sameValue(s["foo"], undefined, 's["foo"]');

View File

@ -11,7 +11,7 @@ description: >
properties properties
---*/ ---*/
var s = new String("hello world"); var s = new String("hello world");
assert.sameValue(s["foo"], undefined, 's["foo"]'); assert.sameValue(s["foo"], undefined, 's["foo"]');

View File

@ -9,7 +9,7 @@ es5id: 15.5.5.5.2-3-2
description: String value indexing returns undefined for missing data properties description: String value indexing returns undefined for missing data properties
---*/ ---*/
var s = String("hello world"); var s = String("hello world");
assert.sameValue(s["foo"], undefined, 's["foo"]'); assert.sameValue(s["foo"], undefined, 's["foo"]');

View File

@ -11,6 +11,6 @@ description: >
(NaN) is not an array index (NaN) is not an array index
---*/ ---*/
var s = new String("hello world"); var s = new String("hello world");
assert.sameValue(s[NaN], undefined, 's[NaN]'); assert.sameValue(s[NaN], undefined, 's[NaN]');

View File

@ -11,6 +11,6 @@ description: >
(Infinity) is not an array index (Infinity) is not an array index
---*/ ---*/
var s = new String("hello world"); var s = new String("hello world");
assert.sameValue(s[Infinity], undefined, 's[Infinity]'); assert.sameValue(s[Infinity], undefined, 's[Infinity]');

View File

@ -11,6 +11,6 @@ description: >
2^32-1) is not an array index 2^32-1) is not an array index
---*/ ---*/
var s = new String("hello world"); var s = new String("hello world");
assert.sameValue(s[Math.pow(2, 32)-1], undefined, 's[Math.pow(2, 32)-1]'); assert.sameValue(s[Math.pow(2, 32) - 1], undefined, 's[Math.pow(2, 32)-1]');

View File

@ -11,6 +11,6 @@ description: >
is not an array index is not an array index
---*/ ---*/
var s = String("hello world"); var s = String("hello world");
assert.sameValue(s[NaN], undefined, 's[NaN]'); assert.sameValue(s[NaN], undefined, 's[NaN]');

View File

@ -11,6 +11,6 @@ description: >
(Infinity) is not an array index (Infinity) is not an array index
---*/ ---*/
var s = String("hello world"); var s = String("hello world");
assert.sameValue(s[Infinity], undefined, 's[Infinity]'); assert.sameValue(s[Infinity], undefined, 's[Infinity]');

View File

@ -11,6 +11,6 @@ description: >
2^32-1) is not an array index 2^32-1) is not an array index
---*/ ---*/
var s = String("hello world"); var s = String("hello world");
assert.sameValue(s[Math.pow(2, 32)-1], undefined, 's[Math.pow(2, 32)-1]'); assert.sameValue(s[Math.pow(2, 32) - 1], undefined, 's[Math.pow(2, 32)-1]');

View File

@ -11,6 +11,6 @@ description: >
less than 0 less than 0
---*/ ---*/
var s = new String("hello world"); var s = new String("hello world");
assert.sameValue(s[-1], undefined, 's[-1]'); assert.sameValue(s[-1], undefined, 's[-1]');

View File

@ -11,6 +11,6 @@ description: >
less than 0 less than 0
---*/ ---*/
var s = String("hello world"); var s = String("hello world");
assert.sameValue(s[-1], undefined, 's[-1]'); assert.sameValue(s[-1], undefined, 's[-1]');

View File

@ -11,6 +11,6 @@ description: >
greater than the string length greater than the string length
---*/ ---*/
var s = new String("hello world"); var s = new String("hello world");
assert.sameValue(s[11], undefined, 's[11]'); assert.sameValue(s[11], undefined, 's[11]');

View File

@ -11,6 +11,6 @@ description: >
greater than the string length greater than the string length
---*/ ---*/
var s = String("hello world"); var s = String("hello world");
assert.sameValue(s[11], undefined, 's[11]'); assert.sameValue(s[11], undefined, 's[11]');

View File

@ -9,12 +9,12 @@ es5id: 15.5.1.1_A1_T1
description: Call String(function(){}()) description: Call String(function(){}())
---*/ ---*/
var __str = String(function(){}()); var __str = String(function() {}());
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(function(){}()); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(function(){}()); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "undefined") { if (__str !== "undefined") {
$ERROR('#2: __str = String(function(){}()); __str === "undefined". Actual: __str ==='+__str ); $ERROR('#2: __str = String(function(){}()); __str === "undefined". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(1);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(1); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(1); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "1") { if (__str !== "1") {
$ERROR('#2: __str = String(1); __str === "1". Actual: __str ==='+__str ); $ERROR('#2: __str = String(1); __str === "1". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -32,7 +32,7 @@ __str = String(-1);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String(-1); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String(-1); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "-1") { if (__str !== "-1") {
$ERROR('#4: __str = String(-1); __str === "-1". Actual: __str ==='+__str ); $ERROR('#4: __str = String(-1); __str === "-1". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -9,12 +9,12 @@ es5id: 15.5.1.1_A1_T11
description: Call String(1/0) and String(-1/0), and call with +/-Infinity description: Call String(1/0) and String(-1/0), and call with +/-Infinity
---*/ ---*/
var __str = String(1/0); var __str = String(1 / 0);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(1/0); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(1/0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,17 +22,17 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "Infinity") { if (__str !== "Infinity") {
$ERROR('#2: __str = String(1/0); __str === "Infinity". Actual: __str ==='+__str ); $ERROR('#2: __str = String(1/0); __str === "Infinity". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
__str = String(-1/0); __str = String(-1 / 0);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String(-1/0); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String(-1/0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !== "-Infinity") { if (__str !== "-Infinity") {
$ERROR('#4: __str = String(-1/0); __str === "-Infinity". Actual: __str ==='+__str ); $ERROR('#4: __str = String(-1/0); __str === "-Infinity". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -50,7 +50,7 @@ __str = String(Infinity);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#5: __str = String(Infinity); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#5: __str = String(Infinity); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#6 //CHECK#6
if (__str !== "Infinity") { if (__str !== "Infinity") {
$ERROR('#6: __str = String(Infinity); __str === "Infinity". Actual: __str ==='+__str ); $ERROR('#6: __str = String(Infinity); __str === "Infinity". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -68,7 +68,7 @@ __str = String(-Infinity);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#7 //CHECK#7
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#7: __str = String(-Infinity); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#7: __str = String(-Infinity); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -76,7 +76,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#8 //CHECK#8
if (__str !== "-Infinity") { if (__str !== "-Infinity") {
$ERROR('#8: __str = String(-Infinity); __str === "-Infinity". Actual: __str ==='+__str ); $ERROR('#8: __str = String(-Infinity); __str === "-Infinity". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -86,7 +86,7 @@ __str = String(Number.POSITIVE_INFINITY);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#9 //CHECK#9
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#9: __str = String(Number.POSITIVE_INFINITY); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#9: __str = String(Number.POSITIVE_INFINITY); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -94,7 +94,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#10 //CHECK#10
if (__str !== "Infinity") { if (__str !== "Infinity") {
$ERROR('#10: __str = String(Number.POSITIVE_INFINITY); __str === "Infinity". Actual: __str ==='+__str ); $ERROR('#10: __str = String(Number.POSITIVE_INFINITY); __str === "Infinity". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -104,7 +104,7 @@ __str = String(Number.NEGATIVE_INFINITY);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#11 //CHECK#11
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#11: __str = String(Number.NEGATIVE_INFINITY); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#11: __str = String(Number.NEGATIVE_INFINITY); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -112,7 +112,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#12 //CHECK#12
if (__str !== "-Infinity") { if (__str !== "-Infinity") {
$ERROR('#12: __str = String(Number.NEGATIVE_INFINITY); __str === "-Infinity". Actual: __str ==='+__str ); $ERROR('#12: __str = String(Number.NEGATIVE_INFINITY); __str === "-Infinity". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -9,12 +9,12 @@ es5id: 15.5.1.1_A1_T12
description: Call String(1/"a"), String("b"* null) and String(Number.NaN) description: Call String(1/"a"), String("b"* null) and String(Number.NaN)
---*/ ---*/
var __str = String(1/"a"); var __str = String(1 / "a");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(1/"a"); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(1/"a"); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,17 +22,17 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "NaN") { if (__str !== "NaN") {
$ERROR('#2: __str = String(1/"a"); __str === "NaN". Actual: __str ==='+__str ); $ERROR('#2: __str = String(1/"a"); __str === "NaN". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
__str = String("b"*null); __str = String("b" * null);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String("b"*null); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String("b"*null); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !== "NaN") { if (__str !== "NaN") {
$ERROR('#4: __str = String("b"*null); __str === "NaN". Actual: __str ==='+__str ); $ERROR('#4: __str = String("b"*null); __str === "NaN". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -50,7 +50,7 @@ __str = String(Number.NaN);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#5: __str = String(Number.NaN); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#5: __str = String(Number.NaN); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#6 //CHECK#6
if (__str !== "NaN") { if (__str !== "NaN") {
$ERROR('#6: __str = String(Number.NaN); __str === "NaN". Actual: __str ==='+__str ); $ERROR('#6: __str = String(Number.NaN); __str === "NaN". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(true);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(true); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(true); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "true") { if (__str !== "true") {
$ERROR('#2: __str = String(true); __str === "true". Actual: __str ==='+__str ); $ERROR('#2: __str = String(true); __str === "true". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -32,7 +32,7 @@ __str = String(false);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String(false); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String(false); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !== "false") { if (__str !== "false") {
$ERROR('#4: __str = String(false); __str === "false". Actual: __str ==='+__str ); $ERROR('#4: __str = String(false); __str === "false". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -50,7 +50,7 @@ __str = String(Boolean(true));
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#5: __str = String(Boolean(true)); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#5: __str = String(Boolean(true)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#6 //CHECK#6
if (__str !== "true") { if (__str !== "true") {
$ERROR('#6: __str = String(Boolean(true)); __str === "true". Actual: __str ==='+__str ); $ERROR('#6: __str = String(Boolean(true)); __str === "true". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -68,7 +68,7 @@ __str = String(Boolean(false));
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#7 //CHECK#7
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#7: __str = String(Boolean(false)); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#7: __str = String(Boolean(false)); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -76,7 +76,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#8 //CHECK#8
if (__str !== "false") { if (__str !== "false") {
$ERROR('#8: __str = String(Boolean(false)); __str === "false". Actual: __str ==='+__str ); $ERROR('#8: __str = String(Boolean(false)); __str === "false". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(0);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(0); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "0") { if (__str !== "0") {
$ERROR('#2: __str = String(0); __str === "0". Actual: __str ==='+__str ); $ERROR('#2: __str = String(0); __str === "0". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -32,7 +32,7 @@ __str = String(-0);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String(-0); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String(-0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "0") { if (__str !== "0") {
$ERROR('#4: __str = String(-0); __str === "0". Actual: __str ==='+__str ); $ERROR('#4: __str = String(-0); __str === "0". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -18,7 +18,7 @@ var __str = String(__obj__str);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__str !== __obj__str) { if (__str !== __obj__str) {
$ERROR('#1: __obj__str = "caps"; __str = String(__obj__str); __str === __obj__str. Actual: __str ==='+__str ); $ERROR('#1: __obj__str = "caps"; __str = String(__obj__str); __str === __obj__str. Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(.12345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(.12345); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(.12345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "0.12345") { if (__str !== "0.12345") {
$ERROR('#2: __str = String(.12345); __str === "0.12345". Actual: __str ==='+__str ); $ERROR('#2: __str = String(.12345); __str === "0.12345". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -32,7 +32,7 @@ __str = String(.012345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String(.012345); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String(.012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !== "0.012345") { if (__str !== "0.012345") {
$ERROR('#4: __str = String(.012345); __str === "0.012345". Actual: __str ==='+__str ); $ERROR('#4: __str = String(.012345); __str === "0.012345". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -50,7 +50,7 @@ __str = String(.0012345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#5: __str = String(.0012345); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#5: __str = String(.0012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -58,7 +58,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#6 //CHECK#6
if (__str !== "0.0012345") { if (__str !== "0.0012345") {
$ERROR('#6: __str = String(.0012345); __str === "0.0012345". Actual: __str ==='+__str ); $ERROR('#6: __str = String(.0012345); __str === "0.0012345". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -68,7 +68,7 @@ __str = String(.00000012345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#7 //CHECK#7
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#7: __str = String(.00000012345); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#7: __str = String(.00000012345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -76,7 +76,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#8 //CHECK#8
if (__str !== "1.2345e-7") { if (__str !== "1.2345e-7") {
$ERROR('#8: __str = String(.00000012345); __str === "1.2345e-7". Actual: __str ==='+__str ); $ERROR('#8: __str = String(.00000012345); __str === "1.2345e-7". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -16,7 +16,7 @@ var __str = String(1.2345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(1.2345); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(1.2345); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -24,7 +24,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "1.2345") { if (__str !== "1.2345") {
$ERROR('#2: __str = String(1.2345); __str === "1.2345". Actual: __str ==='+__str ); $ERROR('#2: __str = String(1.2345); __str === "1.2345". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -34,7 +34,7 @@ __str = String(1.234567890);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String(1.234567890); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String(1.234567890); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -42,7 +42,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !== "1.23456789") { if (__str !== "1.23456789") {
$ERROR('#4: __str = String(1.234567890); __str === "1.23456789". Actual: __str ==='+__str ); $ERROR('#4: __str = String(1.234567890); __str === "1.23456789". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -52,7 +52,7 @@ __str = String(1.234500000000000000000000000);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#5: __str = String(1.234500000000000000000000000); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#5: __str = String(1.234500000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -60,7 +60,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#6 //CHECK#6
if (__str !== "1.2345") { if (__str !== "1.2345") {
$ERROR('#6: __str = String(1.234500000000000000000000000); __str === "1.2345". Actual: __str ==='+__str ); $ERROR('#6: __str = String(1.234500000000000000000000000); __str === "1.2345". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(1000000000000000000000);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(1000000000000000000000); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(1000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "1e+21") { if (__str !== "1e+21") {
$ERROR('#2: __str = String(1000000000000000000000); __str === "1e+21". Actual: __str ==='+__str ); $ERROR('#2: __str = String(1000000000000000000000); __str === "1e+21". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -32,7 +32,7 @@ __str = String(10000000000000000000000);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#3: __str = String(10000000000000000000000); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = String(10000000000000000000000); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !== "1e+22") { if (__str !== "1e+22") {
$ERROR('#4: __str = String(10000000000000000000000); __str === "1e+22". Actual: __str ==='+__str ); $ERROR('#4: __str = String(10000000000000000000000); __str === "1e+22". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -9,12 +9,12 @@ es5id: 15.5.1.1_A1_T19
description: Call String() with Array of numbers description: Call String() with Array of numbers
---*/ ---*/
var __str = String(new Array(1,2,3)); var __str = String(new Array(1, 2, 3));
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(new Array(1,2,3)); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#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 //CHECK#2
if (__str !== "1,2,3") { if (__str !== "1,2,3") {
$ERROR('#2: __str = String(new Array(1,2,3)); __str === "1,2,3". Actual: __str ==='+__str ); $ERROR('#2: __str = String(new Array(1,2,3)); __str === "1,2,3". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(null);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(null); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(null); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "null") { if (__str !== "null") {
$ERROR('#2: __str = String(null); __str === "null". Actual: __str ==='+__str ); $ERROR('#2: __str = String(null); __str === "null". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(void 0);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(void 0); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(void 0); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "undefined") { if (__str !== "undefined") {
$ERROR('#2: __str = String(void 0); __str === "undefined". Actual: __str ==='+__str ); $ERROR('#2: __str = String(void 0); __str === "undefined". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(undefined);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(undefined); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(undefined); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "undefined") { if (__str !== "undefined") {
$ERROR('#2: __str = String(undefined); __str === "undefined". Actual: __str ==='+__str ); $ERROR('#2: __str = String(undefined); __str === "undefined". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(x);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: var x; __str = String(x); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: var x; __str = String(x); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "undefined") { if (__str !== "undefined") {
$ERROR('#2: var x; __str = String(x); __str === "undefined". Actual: __str ==='+__str ); $ERROR('#2: var x; __str = String(x); __str === "undefined". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = String(eval());
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(eval()); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(eval()); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "undefined") { if (__str !== "undefined") {
$ERROR('#2: __str = String(eval()); __str === "undefined". Actual: __str ==='+__str ); $ERROR('#2: __str = String(eval()); __str === "undefined". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,15 +14,15 @@ var __str = String({});
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String({}); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String({}); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "[object "+"Object"+"]") { if (__str !== "[object " + "Object" + "]") {
$ERROR('#2: __str = String({}); __str === "[object Object]". Actual: __str ==='+__str ); $ERROR('#2: __str = String({}); __str === "[object Object]". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,17 +11,19 @@ description: Call String(new Array)
var __old__Array__prototype__toString = Array.prototype.toString; var __old__Array__prototype__toString = Array.prototype.toString;
Array.prototype.toString=function(){return "__ARRAY__";}; Array.prototype.toString = function() {
return "__ARRAY__";
};
var __str = String(new Array); var __str = String(new Array);
// restore old toString method just in case // restore old toString method just in case
Array.prototype.toString=__old__Array__prototype__toString; Array.prototype.toString = __old__Array__prototype__toString;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(new Array); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(new Array); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -29,7 +31,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "__ARRAY__") { if (__str !== "__ARRAY__") {
$ERROR('#2: Array.prototype.toString=function(){return "__ARRAY__";}; __str = String(new Array); __str === "__ARRAY__". Actual: __str ==='+__str ); $ERROR('#2: Array.prototype.toString=function(){return "__ARRAY__";}; __str = String(new Array); __str === "__ARRAY__". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -9,14 +9,16 @@ es5id: 15.5.1.1_A1_T9
description: Call String(this) description: Call String(this)
---*/ ---*/
var toString=function(){return "__THIS__";}; var toString = function() {
return "__THIS__";
};
var __str = String(this); var __str = String(this);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(this); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(this); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -24,7 +26,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "__THIS__") { if (__str !== "__THIS__") {
$ERROR('#2: toString=function(){return "__THIS__";}; __str = String(this); __str === "__THIS__". Actual: __str ==='+__str ); $ERROR('#2: toString=function(){return "__THIS__";}; __str = String(this); __str === "__THIS__". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@ var __str = String();
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "string") { if (typeof __str !== "string") {
$ERROR('#1: __str = String(); typeof __str === "string". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = String(); typeof __str === "string". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -20,7 +20,7 @@ if (typeof __str !== "string") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !== "") { if (__str !== "") {
$ERROR('#2: __str = String(); __str === "". Actual: __str ==='+__str ); $ERROR('#2: __str = String(); __str === "". Actual: __str ===' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = new String;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String; typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String; typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String; __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String; __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -30,14 +30,14 @@ if (__str.constructor !== String) {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str != "") { if (__str != "") {
$ERROR('#2: __str = new String; __str == "". Actual: __str =='+__str); $ERROR('#2: __str = new String; __str == "". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if ( __str === "") { if (__str === "") {
$ERROR('#3: __str = new String; __str !== ""'); $ERROR('#3: __str = new String; __str !== ""');
} }
// //

View File

@ -11,9 +11,11 @@ description: >
function object's prototype.toString property was changed function object's prototype.toString property was changed
---*/ ---*/
function __FACTORY(){}; function __FACTORY() {};
__FACTORY.prototype.toString=function(){return "tostr"}; __FACTORY.prototype.toString = function() {
return "tostr"
};
var __obj = new __FACTORY; var __obj = new __FACTORY;
@ -22,7 +24,7 @@ var __str = new String(__obj);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(__obj); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(__obj); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -30,7 +32,7 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -38,7 +40,7 @@ if (__str.constructor !== String) {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str != "tostr") { if (__str != "tostr") {
$ERROR('#2: __str = new String(__obj); __str =="tostr". Actual: __str =='+__str ); $ERROR('#2: __str = new String(__obj); __str =="tostr". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,11 +11,15 @@ description: >
changing function object's valueOf and toString properties changing function object's valueOf and toString properties
---*/ ---*/
function __obj(){}; function __obj() {};
__obj.valueOf=function(){return true;}; __obj.valueOf = function() {
return true;
};
__obj.toString=function(){return {};}; __obj.toString = function() {
return {};
};
var __str = new String(__obj); var __str = new String(__obj);
@ -24,7 +28,7 @@ var __str = new String(__obj);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: function __obj(){}; __str = new String(__obj); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: function __obj(){}; __str = new String(__obj); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -32,15 +36,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="true") { if (__str != "true") {
$ERROR('#2: function __obj(){}; __str = new String(__obj); __str =="true". Actual: __str =='+__str ); $ERROR('#2: function __obj(){}; __str = new String(__obj); __str =="true". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -12,9 +12,15 @@ description: >
exception throw exception throw
---*/ ---*/
var __obj = {toString:function(){throw "intostr"}}; var __obj = {
toString: function() {
throw "intostr"
}
};
__obj.valueOf=function(){return true}; __obj.valueOf = function() {
return true
};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
@ -22,8 +28,8 @@ try {
var __str = new String(__obj); var __str = new String(__obj);
$ERROR('#1: var __obj = {toString:function(){throw "intostr"}}; __str = new String(__obj) lead throwing exception'); $ERROR('#1: var __obj = {toString:function(){throw "intostr"}}; __str = new String(__obj) lead throwing exception');
} catch (e) { } catch (e) {
if (e!=="intostr") { if (e !== "intostr") {
$ERROR('#1.1: e==="intostr". Actual: e==='+e); $ERROR('#1.1: e==="intostr". Actual: e===' + e);
} }
} }
// //

View File

@ -12,9 +12,17 @@ description: >
exception throw exception throw
---*/ ---*/
var __obj = {toString:function(){return f; function f(){}}}; var __obj = {
toString: function() {
return f;
__obj.valueOf=function(){throw "invalueof"}; function f() {}
}
};
__obj.valueOf = function() {
throw "invalueof"
};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
@ -22,8 +30,8 @@ try {
var __str = new String(__obj); var __str = new String(__obj);
$ERROR('#1: __obj.valueOf=function(){throw "invalueof"}; __str = new String(__obj) lead throwing exception'); $ERROR('#1: __obj.valueOf=function(){throw "invalueof"}; __str = new String(__obj) lead throwing exception');
} catch (e) { } catch (e) {
if (e!=="invalueof") { if (e !== "invalueof") {
$ERROR('#1.1: e==="invalueof". Actual: e==='+e); $ERROR('#1.1: e==="invalueof". Actual: e===' + e);
} }
} }
// //

View File

@ -11,11 +11,11 @@ description: >
and other numbers and other numbers
---*/ ---*/
var __str =new String(.12345); var __str = new String(.12345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str =new String(.12345); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str =new String(.12345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -23,24 +23,24 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str =new String(.12345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str =new String(.12345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="0.12345") { if (__str != "0.12345") {
$ERROR('#2: __str =new String(.12345); __str =="0.12345". Actual: __str =='+__str ); $ERROR('#2: __str =new String(.12345); __str =="0.12345". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
__str =new String(.012345); __str = new String(.012345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#3: __str =new String(.012345); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str =new String(.012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -48,24 +48,24 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2.5 //CHECK#2.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#3.5: __str =new String(.012345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#3.5: __str =new String(.012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !="0.012345") { if (__str != "0.012345") {
$ERROR('#4: __str =new String(.012345); __str =="0.012345". Actual: __str =='+__str ); $ERROR('#4: __str =new String(.012345); __str =="0.012345". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
__str =new String(.0012345); __str = new String(.0012345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#5: __str =new String(.0012345); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#5: __str =new String(.0012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -73,24 +73,24 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5.5 //CHECK#5.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#5.5: __str =new String(.0012345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#5.5: __str =new String(.0012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#6 //CHECK#6
if (__str !="0.0012345") { if (__str != "0.0012345") {
$ERROR('#6: __str =new String(.0012345); __str =="0.0012345". Actual: __str =='+__str ); $ERROR('#6: __str =new String(.0012345); __str =="0.0012345". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
__str =new String(.00000012345); __str = new String(.00000012345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#7 //CHECK#7
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#7: __str =new String(.00000012345); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#7: __str =new String(.00000012345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -98,15 +98,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#7.5 //CHECK#7.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#7.5: __str =new String(.00000012345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#7.5: __str =new String(.00000012345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#8 //CHECK#8
if (__str !="1.2345e-7") { if (__str != "1.2345e-7") {
$ERROR('#8: __str =new String(.00000012345); __str =="1.2345e-7". Actual: __str =='+__str ); $ERROR('#8: __str =new String(.00000012345); __str =="1.2345e-7". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,7 +15,7 @@ var __str = new String(1.2345);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(1.2345); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(1.2345); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -23,15 +23,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(1.2345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(1.2345); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="1.2345") { if (__str != "1.2345") {
$ERROR('#2: __str = new String(1.2345); __str =="1.2345". Actual: __str =='+__str ); $ERROR('#2: __str = new String(1.2345); __str =="1.2345". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ __str = new String(1.234567890);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#3: __str = new String(1.234567890); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = new String(1.234567890); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -48,15 +48,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3.5 //CHECK#3.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#3.5: __str = new String(1.234567890); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#3.5: __str = new String(1.234567890); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !="1.23456789") { if (__str != "1.23456789") {
$ERROR('#4: __str = new String(1.234567890); __str =="1.23456789". Actual: __str =='+__str ); $ERROR('#4: __str = new String(1.234567890); __str =="1.23456789". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -65,7 +65,7 @@ __str = new String(1.234500000000000000000000000);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#5: __str = new String(1.234500000000000000000000000); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#5: __str = new String(1.234500000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -73,15 +73,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5.5 //CHECK#5.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#5.5: __str = new String(1.234500000000000000000000000); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#5.5: __str = new String(1.234500000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#6 //CHECK#6
if (__str !="1.2345") { if (__str != "1.2345") {
$ERROR('#6: __str = new String(1.234500000000000000000000000); __str =="1.2345". Actual: __str =='+__str ); $ERROR('#6: __str = new String(1.234500000000000000000000000); __str =="1.2345". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,7 +15,7 @@ var __str = new String(1000000000000000000000);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(1000000000000000000000); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(1000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -23,15 +23,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(1000000000000000000000); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(1000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="1e+21") { if (__str != "1e+21") {
$ERROR('#2: __str = new String(1000000000000000000000); __str =="1e+21". Actual: __str =='+__str ); $ERROR('#2: __str = new String(1000000000000000000000); __str =="1e+21". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ __str = new String(10000000000000000000000);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#3: __str = new String(10000000000000000000000); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#3: __str = new String(10000000000000000000000); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -48,15 +48,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3.5 //CHECK#3.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#3.5: __str = new String(10000000000000000000000); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#3.5: __str = new String(10000000000000000000000); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str !="1e+22") { if (__str != "1e+22") {
$ERROR('#4: __str = new String(10000000000000000000000); __str =="1e+22". Actual: __str =='+__str ); $ERROR('#4: __str = new String(10000000000000000000000); __str =="1e+22". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,11 +11,11 @@ description: >
of numbers of numbers
---*/ ---*/
var __str = new String(new Array(1,2,3)); var __str = new String(new Array(1, 2, 3));
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(new Array(1,2,3)); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(new Array(1,2,3)); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -23,15 +23,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(new Array(1,2,3)); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(new Array(1,2,3)); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="1,2,3") { if (__str != "1,2,3") {
$ERROR('#2: __str = new String(new Array(1,2,3)); __str =="1,2,3". Actual: __str =='+__str ); $ERROR('#2: __str = new String(new Array(1,2,3)); __str =="1,2,3". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = new String();
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,22 +22,22 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="") { if (__str != "") {
$ERROR('#2: __str = new String(); __str =="". Actual: __str =='+__str ); $ERROR('#2: __str = new String(); __str =="". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if ( __str === "") { if (__str === "") {
$ERROR('#3: __str = new String(); __str !== ""'); $ERROR('#3: __str = new String(); __str !== ""');
} }
// //

View File

@ -14,7 +14,7 @@ var __str = new String("");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(""); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(""); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,22 +22,22 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(""); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(""); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="") { if (__str != "") {
$ERROR('#2: __str = new String(""); __str =="". Actual: __str =='+__str ); $ERROR('#2: __str = new String(""); __str =="". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if ( __str === "") { if (__str === "") {
$ERROR('#3: __str = new String(""); __str !== ""'); $ERROR('#3: __str = new String(""); __str !== ""');
} }
// //

View File

@ -14,7 +14,7 @@ var __str = new String(1.0);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(1.0); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(1.0); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,15 +22,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(1.0); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(1.0); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !=1.0+"") { if (__str != 1.0 + "") {
$ERROR('#2: __str = new String(1.0); __str ==1.0+"". Actual: __str =='+__str ); $ERROR('#2: __str = new String(1.0); __str ==1.0+"". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = new String(NaN);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(NaN); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(NaN); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,15 +22,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(NaN); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(NaN); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !=(1/"s")+"") { if (__str != (1 / "s") + "") {
$ERROR('#2: __str = new String(NaN); __str ==(1/"s")+"". Actual: __str =='+__str ); $ERROR('#2: __str = new String(NaN); __str ==(1/"s")+"". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str = new String(false);
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(false); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(false); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -22,15 +22,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(false); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(false); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !=false+"") { if (__str != false + "") {
$ERROR('#2: __str = new String(false); __str ==false+"". Actual: __str =='+__str ); $ERROR('#2: __str = new String(false); __str ==false+"". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,7 +11,9 @@ description: Creating string object with "new String({})"
var __stored__Object__prototype__toString = Object.prototype.toString; var __stored__Object__prototype__toString = Object.prototype.toString;
Object.prototype.toString=function(){return "SHIFTED"}; Object.prototype.toString = function() {
return "SHIFTED"
};
var __str = new String({}); var __str = new String({});
@ -20,7 +22,7 @@ Object.prototype.toString = __stored__Object__prototype__toString;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String({}); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String({}); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -28,15 +30,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String({}); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String({}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="SHIFTED") { if (__str != "SHIFTED") {
$ERROR('#2: Object.prototype.toString=function(){return "SHIFTED"}; __str = new String({}); __str =="SHIFTED". Actual: __str =='+__str ); $ERROR('#2: Object.prototype.toString=function(){return "SHIFTED"}; __str = new String({}); __str =="SHIFTED". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,16 +11,18 @@ description: Creating string object with "new String(function(){})"
var __stored__Function__prototype__toString = Function.prototype.toString; var __stored__Function__prototype__toString = Function.prototype.toString;
Function.prototype.toString=function(){return "SHIFTED"}; Function.prototype.toString = function() {
return "SHIFTED"
};
var __str = new String(function(){}); var __str = new String(function() {});
Function.prototype.toString = __stored__Function__prototype__toString; Function.prototype.toString = __stored__Function__prototype__toString;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(function(){}); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(function(){}); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -28,15 +30,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(function(){}); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(function(){}); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="SHIFTED") { if (__str != "SHIFTED") {
$ERROR('#2: Function.prototype.toString=function(){return "SHIFTED"}; __str = new String(function(){}); __str =="SHIFTED". Actual: __str =='+__str ); $ERROR('#2: Function.prototype.toString=function(){return "SHIFTED"}; __str = new String(function(){}); __str =="SHIFTED". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,12 +11,14 @@ description: >
[1,2,3]}())" [1,2,3]}())"
---*/ ---*/
var __str = new String(function(){return [1,2,3]}()); var __str = new String(function() {
return [1, 2, 3]
}());
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof __str !== "object") { if (typeof __str !== "object") {
$ERROR('#1: __str = new String(function(){return [1,2,3]}()); typeof __str === "object". Actual: typeof __str ==='+typeof __str ); $ERROR('#1: __str = new String(function(){return [1,2,3]}()); typeof __str === "object". Actual: typeof __str ===' + typeof __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -24,15 +26,15 @@ if (typeof __str !== "object") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1.5 //CHECK#1.5
if (__str.constructor !== String) { if (__str.constructor !== String) {
$ERROR('#1.5: __str = new String(function(){return [1,2,3]}()); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); $ERROR('#1.5: __str = new String(function(){return [1,2,3]}()); __str.constructor === String. Actual: __str.constructor ===' + __str.constructor);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str !="1,2,3") { if (__str != "1,2,3") {
$ERROR('#2: __str = new String(function(){return [1,2,3]}()); __str =="1,2,3". Actual: __str =='+__str ); $ERROR('#2: __str = new String(function(){return [1,2,3]}()); __str =="1,2,3". Actual: __str ==' + __str);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,8 +15,8 @@ var __str__obj = new String("shocking blue");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__str__obj["__custom__prop"]!==undefined) { 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"]); $ERROR('#1: var __str__obj = new String("shocking blue"); __str__obj["__custom__prop"]===undefined. Actual: __str__obj["__custom__prop"]===' + __str__obj["__custom__prop"]);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -25,8 +25,8 @@ String.prototype.__custom__prop = "bor";
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str__obj["__custom__prop"]!=="bor") { 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"]); $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"]);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,8 +15,8 @@ __str__obj.toString = Object.prototype.toString;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__str__obj.toString() !== "[object "+"String"+"]") { 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() ); $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());
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -10,7 +10,7 @@ description: Checking String.length
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// CHECK# // CHECK#
if (String.length !== 1) { if (String.length !== 1) {
$ERROR('String has length property whose value is 1. Actual: String.length==='+String.length); $ERROR('String has length property whose value is 1. Actual: String.length===' + String.length);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@ description: Checking Function.prototype.isPrototypeOf(String)
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// CHECK# // CHECK#
if (!(Function.prototype.isPrototypeOf(String))) { if (!(Function.prototype.isPrototypeOf(String))) {
$ERROR('#1: Function.prototype.isPrototypeOf(String) return true. Actual: '+Function.prototype.isPrototypeOf(String)); $ERROR('#1: Function.prototype.isPrototypeOf(String) return true. Actual: ' + Function.prototype.isPrototypeOf(String));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ Function.prototype.indicator = 1;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// CHECK# // CHECK#
if (String.indicator !== 1) { if (String.indicator !== 1) {
$ERROR('#1: Function.prototype.indicator = 1; String.indicator === 1. Actual: String.indicator ==='+String.indicator ); $ERROR('#1: Function.prototype.indicator = 1; String.indicator === 1. Actual: String.indicator ===' + String.indicator);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@ var __str__instance = new String("ABC\u0041\u0042\u0043");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__str__instance.length !== 6) { 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 ); $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);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -24,7 +24,7 @@ __str__instance = new String;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str__instance.length !== 0) { 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 ); $ERROR('#2: __str__instance = new String; __str__instance.length === 0, where __str__instance is new String. Actual: __str__instance.length ===' + __str__instance.length);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -12,17 +12,17 @@ var __str__instance = new String("globglob");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(__str__instance.hasOwnProperty("length"))) { if (!(__str__instance.hasOwnProperty("length"))) {
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: '+__str__instance.hasOwnProperty("length")); $ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
for(var prop in __str__instance){ for (var prop in __str__instance) {
if (prop === "length") { if (prop === "length") {
$ERROR('#2: length property has the attributes {DontEnum}'); $ERROR('#2: length property has the attributes {DontEnum}');
} }
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -13,7 +13,7 @@ var __str__instance = new String("globglob");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(__str__instance.hasOwnProperty("length"))) { if (!(__str__instance.hasOwnProperty("length"))) {
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: '+__str__instance.hasOwnProperty("length")); $ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -36,7 +36,7 @@ try {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (!(__str__instance.hasOwnProperty("length"))) { 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")); $ERROR('#3: var __str__instance = new String("globglob"); delete __str__instance.length; __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -13,7 +13,7 @@ var __str__instance = new String("globglob");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(__str__instance.hasOwnProperty("length"))) { if (!(__str__instance.hasOwnProperty("length"))) {
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: '+__str__instance.hasOwnProperty("length")); $ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: ' + __str__instance.hasOwnProperty("length"));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -21,28 +21,28 @@ if (!(__str__instance.hasOwnProperty("length"))) {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str__instance.length !== 8) { if (__str__instance.length !== 8) {
$ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ==='+__str__instance.length ); $ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ===' + __str__instance.length);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
__str__instance.length=-1; __str__instance.length = -1;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (__str__instance.length !== 8) { 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 ); $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);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
with(__str__instance) with(__str__instance)
length = 0; length = 0;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#4 //CHECK#4
if (__str__instance.length !== 8) { 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 ); $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);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -52,7 +52,7 @@ __str__instance.length++;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#5 //CHECK#5
if (__str__instance.length !== 8) { 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 ); $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);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -13,7 +13,7 @@ var __str__instance = new String("globglob");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(__str__instance.hasOwnProperty("length"))) { if (!(__str__instance.hasOwnProperty("length"))) {
$ERROR('#1: var __str__instance = new String("globglob"); __str__instance.hasOwnProperty("length") return true. Actual: '+__str__instance.hasOwnProperty("length")); $ERROR('#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 //CHECK#2
if (__str__instance.length !== 8) { if (__str__instance.length !== 8) {
$ERROR('#2: var __str__instance = new String("globglob"); __str__instance.length === 8. Actual: __str__instance.length ==='+__str__instance.length ); $ERROR('#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 //CHECK#3
if (__str__instance.length !== 8) { 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 ); $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);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,18 +14,22 @@ var __str__instance = new String("ABC\u0041\u0042\u0043");
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__str__instance.length !== 6) { 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 ); $ERROR('#1: var __str__instance = new String("ABC\\u0041\\u0042\\u0043"); __str__instance.length === 6. Actual: __str__instance.length ===' + __str__instance.length);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
__str__instance.valueOf = function(){return "ed"}; __str__instance.valueOf = function() {
__str__instance.toString = function(){return "ed"}; return "ed"
};
__str__instance.toString = function() {
return "ed"
};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (__str__instance !="ed") { 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 ); $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);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -33,7 +37,7 @@ if (__str__instance !="ed") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (__str__instance.length !== 6) { 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 ); $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);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -16,7 +16,7 @@ try {
$ERROR('#1: __str = new String; __str() lead to throwing exception'); $ERROR('#1: __str = new String; __str() lead to throwing exception');
} catch (e) { } catch (e) {
if (!(e instanceof TypeError)) { if (!(e instanceof TypeError)) {
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e); $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
} }
} }
// //

View File

@ -14,7 +14,7 @@ try {
$ERROR('#1: String("a|b")() lead to throwing exception'); $ERROR('#1: String("a|b")() lead to throwing exception');
} catch (e) { } catch (e) {
if (!(e instanceof TypeError)) { if (!(e instanceof TypeError)) {
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e); $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
} }
} }
// //

View File

@ -16,7 +16,7 @@ try {
$ERROR('#1: __str = new Object(""); "new __str" lead to throwing exception'); $ERROR('#1: __str = new Object(""); "new __str" lead to throwing exception');
} catch (e) { } catch (e) {
if (!(e instanceof TypeError)) { if (!(e instanceof TypeError)) {
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e); $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
} }
} }
// //

View File

@ -14,7 +14,7 @@ try {
$ERROR('#1: "new new String" lead to throwing exception'); $ERROR('#1: "new new String" lead to throwing exception');
} catch (e) { } catch (e) {
if (!(e instanceof TypeError)) { if (!(e instanceof TypeError)) {
$ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e); $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
} }
} }
// //

View File

@ -12,13 +12,17 @@ description: Try to overload toString method
try try
{ {
var __obj = {toString: function() {return new Object();}} var __obj = {
String(__obj); toString: function() {
$ERROR('#1.1: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (String(__obj))); return new Object();
}
}
String(__obj);
$ERROR('#1.1: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (String(__obj)));
} }
catch(e) catch (e)
{ {
if ((e instanceof TypeError) !== true) { if ((e instanceof TypeError) !== true) {
$ERROR('#1.2: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (e)); $ERROR('#1.2: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (e));
} }
} }

View File

@ -15,12 +15,19 @@ description: >
try try
{ {
var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}} var __obj = {
if (String(__obj) !== "1") { toString: function() {
$ERROR('#1.1: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (String(__obj))); return new Object();
} },
valueOf: function() {
return 1;
}
}
if (String(__obj) !== "1") {
$ERROR('#1.1: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (String(__obj)));
}
} }
catch(e) catch (e)
{ {
$ERROR('#1.2: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (e)); $ERROR('#1.2: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (e));
} }

View File

@ -12,13 +12,27 @@ description: >
---*/ ---*/
// CHECK#1 // CHECK#1
var object = {valueOf: function() {return 0}, toString: function() {return 1}}; var object = {
valueOf: function() {
return 0
},
toString: function() {
return 1
}
};
if (String(object) !== "1") { if (String(object) !== "1") {
$ERROR('#1: var object = {valueOf: function() {return 0}, toString: function() {return 1}}; String(object) === "1". Actual: ' + (String(object))); $ERROR('#1: var object = {valueOf: function() {return 0}, toString: function() {return 1}}; String(object) === "1". Actual: ' + (String(object)));
} }
// CHECK#2 // CHECK#2
var object = {valueOf: function() {return 0}, toString: function() {return {}}}; var object = {
valueOf: function() {
return 0
},
toString: function() {
return {}
}
};
if (String(object) !== "0") { if (String(object) !== "0") {
$ERROR('#2: var object = {valueOf: function() {return 0}, toString: function() {return {}}}; String(object) === "0". Actual: ' + (String(object))); $ERROR('#2: var object = {valueOf: function() {return 0}, toString: function() {return {}}}; String(object) === "0". Actual: ' + (String(object)));
} }

View File

@ -15,6 +15,6 @@ if (String(-1234567890) !== "-1234567890") {
} }
// CHECK#2 // CHECK#2
if ("-"+String(-(-1234567890)) !== "-1234567890") { if ("-" + String(-(-1234567890)) !== "-1234567890") {
$ERROR('#2: "-"+String(-(-1234567890)) === "-1234567890". Actual: ' + ("-"+String(-(-1234567890)))); $ERROR('#2: "-"+String(-(-1234567890)) === "-1234567890". Actual: ' + ("-" + String(-(-1234567890))));
} }

View File

@ -55,38 +55,54 @@ if (String(new Boolean(false)) !== "false") {
} }
// CHECK#10 // CHECK#10
if (String(new Array(2,4,8,16,32)) !== "2,4,8,16,32") { 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)))); $ERROR('#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 // CHECK#11
var myobj1 = { var myobj1 = {
toNumber : function(){return 12345;}, toNumber: function() {
toString : function(){return 67890;}, return 12345;
valueOf : function(){return "[object MyObj]";} },
}; toString: function() {
return 67890;
},
valueOf: function() {
return "[object MyObj]";
}
};
if (String(myobj1) !== "67890"){ if (String(myobj1) !== "67890") {
$ERROR("#11: String(myobj) calls ToPrimitive with hint String"); $ERROR("#11: String(myobj) calls ToPrimitive with hint String");
} }
// CHECK#12 // CHECK#12
var myobj2 = { var myobj2 = {
toNumber : function(){return 12345;}, toNumber: function() {
toString : function(){return {}}, return 12345;
valueOf : function(){return "[object MyObj]";} },
}; toString: function() {
return {}
},
valueOf: function() {
return "[object MyObj]";
}
};
if (String(myobj2) !== "[object MyObj]"){ if (String(myobj2) !== "[object MyObj]") {
$ERROR("#12: String(myobj) calls ToPrimitive with hint String"); $ERROR("#12: String(myobj) calls ToPrimitive with hint String");
} }
// CHECK#13 // CHECK#13
var myobj3 = { var myobj3 = {
toNumber : function(){return 12345;}, toNumber: function() {
valueOf : function(){return "[object MyObj]";} return 12345;
}; },
valueOf: function() {
return "[object MyObj]";
}
};
if (String(myobj3) !== "[object Object]"){ if (String(myobj3) !== "[object Object]") {
$ERROR("#13: String(myobj) calls ToPrimitive with hint String"); $ERROR("#13: String(myobj) calls ToPrimitive with hint String");
} }

View File

@ -10,7 +10,7 @@ description: Checking String.fromCharCode.length
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (typeof String.fromCharCode !== "function") { if (typeof String.fromCharCode !== "function") {
$ERROR('#1: typeof String.fromCharCode === "function". Actual: typeof String.fromCharCode ==='+typeof String.fromCharCode ); $ERROR('#1: typeof String.fromCharCode === "function". Actual: typeof String.fromCharCode ===' + typeof String.fromCharCode);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -18,7 +18,7 @@ if (typeof String.fromCharCode !== "function") {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (!(String.hasOwnProperty("fromCharCode"))) { if (!(String.hasOwnProperty("fromCharCode"))) {
$ERROR('#2: String.hasOwnProperty("fromCharCode") return true. Actual: '+String.hasOwnProperty("fromCharCode")); $ERROR('#2: String.hasOwnProperty("fromCharCode") return true. Actual: ' + String.hasOwnProperty("fromCharCode"));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -26,7 +26,7 @@ if (!(String.hasOwnProperty("fromCharCode"))) {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (String.fromCharCode.length !== 1) { if (String.fromCharCode.length !== 1) {
$ERROR('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ==='+String.fromCharCode.length ); $ERROR('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ===' + String.fromCharCode.length);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -10,7 +10,7 @@ description: Call String.fromCharCode()
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (String.fromCharCode() !== "") { if (String.fromCharCode() !== "") {
$ERROR('#1: String.fromCharCode () returns empty string. Actual: '+String.fromCharCode()); $ERROR('#1: String.fromCharCode () returns empty string. Actual: ' + String.fromCharCode());
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -9,8 +9,8 @@ description: Call String.fromCharCode(65,66,66,65)
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (String.fromCharCode(65,66,66,65) !== "ABBA") { 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) ); $ERROR('#1: String.fromCharCode(65,66,66,65) === "ABBA". Actual: String.fromCharCode(65,66,66,65) ===' + String.fromCharCode(65, 66, 66, 65));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,8 +15,8 @@ delete String.fromCharCode;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__fcc__func(65,66,66,65) !== "ABBA") { 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) ); $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));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -14,10 +14,10 @@ delete String.fromCharCode;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
try { try {
var __obj = new __fcc__func(65,66,66,65); 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'); $ERROR('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception');
} catch (e) { } catch (e) {
if (e instanceof Test262Error) throw e; if (e instanceof Test262Error) throw e;
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -12,41 +12,41 @@ description: >
// CHECK#1 // CHECK#1
if (String.fromCharCode(Number.NaN).charCodeAt(0) !== +0) { 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))); $ERROR('#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) { } else if (1 / String.fromCharCode(Number.NaN).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
$ERROR('#1.2: String.fromCharCode(Number.NaN).charCodeAt(0) === +0. Actual: -0'); $ERROR('#1.2: String.fromCharCode(Number.NaN).charCodeAt(0) === +0. Actual: -0');
} }
// CHECK#2 // CHECK#2
if (String.fromCharCode(Number("abc")).charCodeAt(0) !== +0) { 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))); $ERROR('#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) { } else if (1 / String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
$ERROR('#2.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0'); $ERROR('#2.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
} }
// CHECK#3 // CHECK#3
if (String.fromCharCode(0).charCodeAt(0) !== +0) { if (String.fromCharCode(0).charCodeAt(0) !== +0) {
$ERROR('#3.1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0))); $ERROR('#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) { } else if (1 / String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
$ERROR('#3.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0'); $ERROR('#3.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');
} }
// CHECK#4 // CHECK#4
if (String.fromCharCode(-0).charCodeAt(0) !== +0) { if (String.fromCharCode(-0).charCodeAt(0) !== +0) {
$ERROR("#4.1: String.fromCharCode(-0).charCodeAt(0) === +0"); $ERROR("#4.1: String.fromCharCode(-0).charCodeAt(0) === +0");
} else if (1/String.fromCharCode(-0).charCodeAt(0) !== Number.POSITIVE_INFINITY) { } else if (1 / String.fromCharCode(-0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {
$ERROR("#4.2: String.fromCharCode(-0).charCodeAt(0) === +0. Actual: -0"); $ERROR("#4.2: String.fromCharCode(-0).charCodeAt(0) === +0. Actual: -0");
} }
// CHECK#5 // CHECK#5
if (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) !== +0) { 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))); $ERROR('#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) { } 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'); $ERROR('#5.2: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === +0. Actual: -0');
} }
// CHECK#6 // CHECK#6
if (String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== +0) { if (String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== +0) {
$ERROR("#6.1: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0"); $ERROR("#6.1: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0");
} else if (1/String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) { } 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"); $ERROR("#6.2: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0. Actual: -0");
} }

View File

@ -8,26 +8,51 @@ description: Type(x) is Object
---*/ ---*/
//CHECK#1 //CHECK#1
var object = {valueOf: function() {return 1}}; var object = {
valueOf: function() {
return 1
}
};
if (String.fromCharCode(object).charCodeAt(0) !== 1) { 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))); $ERROR('#1: var object = {valueOf: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
} }
//CHECK#2 //CHECK#2
var object = {valueOf: function() {return 1}, toString: function() {return 0}}; var object = {
valueOf: function() {
return 1
},
toString: function() {
return 0
}
};
if (String.fromCharCode(object).charCodeAt(0) !== 1) { 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))); $ERROR('#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 //CHECK#3
var object = {valueOf: function() {return 1}, toString: function() {return {}}}; var object = {
valueOf: function() {
return 1
},
toString: function() {
return {}
}
};
if (String.fromCharCode(object).charCodeAt(0) !== 1) { 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))); $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
} }
//CHECK#4 //CHECK#4
try { try {
var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; var object = {
valueOf: function() {
return 1
},
toString: function() {
throw "error"
}
};
if (String.fromCharCode(object).charCodeAt(0) !== 1) { 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))); $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)));
} }
@ -41,20 +66,38 @@ catch (e) {
} }
//CHECK#5 //CHECK#5
var object = {toString: function() {return 1}}; var object = {
toString: function() {
return 1
}
};
if (String.fromCharCode(object).charCodeAt(0) !== 1) { 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))); $ERROR('#5: var object = {toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
} }
//CHECK#6 //CHECK#6
var object = {valueOf: function() {return {}}, toString: function() {return 1}} var object = {
valueOf: function() {
return {}
},
toString: function() {
return 1
}
}
if (String.fromCharCode(object).charCodeAt(0) !== 1) { 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))); $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));
} }
//CHECK#7 //CHECK#7
try { try {
var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; var object = {
valueOf: function() {
throw "error"
},
toString: function() {
return 1
}
};
object >>> 0; object >>> 0;
$ERROR('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (object >>> 0)); $ERROR('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; object throw "error". Actual: ' + (object >>> 0));
} }
@ -66,7 +109,14 @@ catch (e) {
//CHECK#8 //CHECK#8
try { try {
var object = {valueOf: function() {return {}}, toString: function() {return {}}}; var object = {
valueOf: function() {
return {}
},
toString: function() {
return {}
}
};
object >>> 0; object >>> 0;
$ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (object >>> 0)); $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (object >>> 0));
} }

View File

@ -25,6 +25,10 @@ assert.sameValue(String.fromCodePoint(true), '\x01');
assert.sameValue(String.fromCodePoint('42'), '\x2A'); assert.sameValue(String.fromCodePoint('42'), '\x2A');
assert.sameValue(String.fromCodePoint('042'), '\x2A'); assert.sameValue(String.fromCodePoint('042'), '\x2A');
assert.sameValue( assert.sameValue(
String.fromCodePoint({ valueOf: function() { return 31; } }), String.fromCodePoint({
valueOf: function() {
return 31;
}
}),
'\x1F' '\x1F'
); );

View File

@ -26,4 +26,4 @@ str = new String(' \b ');
assert.sameValue(str.length, 3, 'character escape (U+008, "backspace")'); assert.sameValue(str.length, 3, 'character escape (U+008, "backspace")');
str = new String('\ud834\udf06'); str = new String('\ud834\udf06');
assert.sameValue(str.length, 2, 'Unicode escape (surrogate pair)'); assert.sameValue(str.length, 2, 'Unicode escape (surrogate pair)');

View File

@ -10,7 +10,7 @@ description: Checking String.hasOwnProperty('prototype')
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(String.hasOwnProperty('prototype'))) { if (!(String.hasOwnProperty('prototype'))) {
$ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype')); $ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -10,7 +10,7 @@ description: Checking if enumerating the String.prototype property fails
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#0 //CHECK#0
if (!(String.hasOwnProperty('prototype'))) { if (!(String.hasOwnProperty('prototype'))) {
$ERROR('#0: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype')); $ERROR('#0: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -19,7 +19,7 @@ if (!(String.hasOwnProperty('prototype'))) {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// CHECK#1 // CHECK#1
if (String.propertyIsEnumerable('prototype')) { if (String.propertyIsEnumerable('prototype')) {
$ERROR('#1: String.propertyIsEnumerable(\'prototype\') return false. Actual: '+String.propertyIsEnumerable('prototype')); $ERROR('#1: String.propertyIsEnumerable(\'prototype\') return false. Actual: ' + String.propertyIsEnumerable('prototype'));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -27,14 +27,14 @@ if (String.propertyIsEnumerable('prototype')) {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// CHECK#2 // CHECK#2
var count=0; var count = 0;
for (var p in String){ for (var p in String) {
if (p==="prototype") count++; if (p === "prototype") count++;
} }
if (count !== 0) { if (count !== 0) {
$ERROR('#2: count=0; for (p in String){ if (p==="prototype") count++;}; count === 0. Actual: count ==='+count ); $ERROR('#2: count=0; for (p in String){ if (p==="prototype") count++;}; count === 0. Actual: count ===' + count);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,7 +11,7 @@ includes: [propertyHelper.js]
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(String.hasOwnProperty('prototype'))) { if (!(String.hasOwnProperty('prototype'))) {
$ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype')); $ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -34,7 +34,7 @@ try {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#3 //CHECK#3
if (!(String.hasOwnProperty('prototype'))) { if (!(String.hasOwnProperty('prototype'))) {
$ERROR('#3: delete String.prototype; String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype')); $ERROR('#3: delete String.prototype; String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,19 +11,21 @@ includes: [propertyHelper.js]
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(String.hasOwnProperty('prototype'))) { if (!(String.hasOwnProperty('prototype'))) {
$ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: '+String.hasOwnProperty('prototype')); $ERROR('#1: String.hasOwnProperty(\'prototype\') return true. Actual: ' + String.hasOwnProperty('prototype'));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
var __obj = String.prototype; var __obj = String.prototype;
verifyNotWritable(String, "prototype", null, function(){return "shifted";}); verifyNotWritable(String, "prototype", null, function() {
return "shifted";
});
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (String.prototype !== __obj) { if (String.prototype !== __obj) {
$ERROR('#2: __obj = String.prototype; String.prototype = function(){return "shifted";}; String.prototype === __obj. Actual: String.prototype ==='+String.prototype ); $ERROR('#2: __obj = String.prototype; String.prototype = function(){return "shifted";}; String.prototype === __obj. Actual: String.prototype ===' + String.prototype);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -15,8 +15,8 @@ delete String.prototype.toString;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (String.prototype.toString() !== "[object "+"String"+"]") { if (String.prototype.toString() !== "[object " + "String" + "]") {
$ERROR('#1: delete String.prototype.toString; String.prototype.toString() === "[object "+"String"+"]". Actual: String.prototype.toString() ==='+String.prototype.toString() ); $ERROR('#1: delete String.prototype.toString; String.prototype.toString() === "[object "+"String"+"]". Actual: String.prototype.toString() ===' + String.prototype.toString());
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -9,8 +9,8 @@ description: Checking String.prototype
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (String.prototype !="") { if (String.prototype != "") {
$ERROR('#1: String.prototype =="". Actual: String.prototype =='+String.prototype ); $ERROR('#1: String.prototype =="". Actual: String.prototype ==' + String.prototype);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -12,7 +12,7 @@ description: Checking Object.prototype.isPrototypeOf(String.prototype)
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(Object.prototype.isPrototypeOf(String.prototype))) { if (!(Object.prototype.isPrototypeOf(String.prototype))) {
$ERROR('#1: Object.prototype.isPrototypeOf(String.prototype) return true. Actual: '+Object.prototype.isPrototypeOf(String.prototype)); $ERROR('#1: Object.prototype.isPrototypeOf(String.prototype) return true. Actual: ' + Object.prototype.isPrototypeOf(String.prototype));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -21,8 +21,8 @@ delete String.prototype.toString;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (String.prototype.toString() != "[object "+"String"+"]") { if (String.prototype.toString() != "[object " + "String" + "]") {
$ERROR('#2: delete String.prototype.toString; String.prototype.toString() == "[object "+"String"+"]". Actual: String.prototype.toString() =='+String.prototype.toString() ); $ERROR('#2: delete String.prototype.toString; String.prototype.toString() == "[object "+"String"+"]". Actual: String.prototype.toString() ==' + String.prototype.toString());
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -7,7 +7,11 @@ es5id: 15.5.4.4_A1.1
description: Checking by using eval description: Checking by using eval
---*/ ---*/
function __FACTORY(){this.toString = function(){ return "wizard";};}; function __FACTORY() {
this.toString = function() {
return "wizard";
};
};
__FACTORY.prototype.charAt = String.prototype.charAt; __FACTORY.prototype.charAt = String.prototype.charAt;
@ -15,8 +19,8 @@ var __instance = new __FACTORY;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__instance.charAt(eval("1"),true,null,{})!== "i") { if (__instance.charAt(eval("1"), true, null, {}) !== "i") {
$ERROR('#1: __instance.charAt(eval("1"),true,null,{})=== "i". Actual: '+__instance.charAt(eval("1"),true,null,{})); $ERROR('#1: __instance.charAt(eval("1"),true,null,{})=== "i". Actual: ' + __instance.charAt(eval("1"), true, null, {}));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -13,19 +13,21 @@ includes: [propertyHelper.js]
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(String.prototype.charAt.hasOwnProperty('length'))) { if (!(String.prototype.charAt.hasOwnProperty('length'))) {
$ERROR('#1: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); $ERROR('#1: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.charAt.hasOwnProperty('length'));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
var __obj = String.prototype.charAt.length; var __obj = String.prototype.charAt.length;
verifyNotWritable(String.prototype.charAt, "length", null, function(){return "shifted";}); verifyNotWritable(String.prototype.charAt, "length", null, function() {
return "shifted";
});
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
if (String.prototype.charAt.length !== __obj) { 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 ); $ERROR('#2: __obj = String.prototype.charAt.length; String.prototype.charAt.length = function(){return "shifted";}; String.prototype.charAt.length === __obj. Actual: ' + String.prototype.charAt.length);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -10,7 +10,7 @@ description: Checking String.prototype.charAt.length
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (!(String.prototype.charAt.hasOwnProperty("length"))) { if (!(String.prototype.charAt.hasOwnProperty("length"))) {
$ERROR('#1: String.prototype.charAt.hasOwnProperty("length") return true. Actual: '+String.prototype.charAt.hasOwnProperty("length")); $ERROR('#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 //CHECK#2
if (String.prototype.charAt.length !== 1) { if (String.prototype.charAt.length !== 1) {
$ERROR('#2: String.prototype.charAt.length === 1. Actual: '+String.prototype.charAt.length ); $ERROR('#2: String.prototype.charAt.length === 1. Actual: ' + String.prototype.charAt.length);
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -13,8 +13,8 @@ __instance.charAt = String.prototype.charAt;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__instance.charAt(false)+__instance.charAt(true) !== "42") { 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) ); $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));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -7,13 +7,17 @@ es5id: 15.5.4.4_A1_T10
description: Call charAt() function with object argument description: Call charAt() function with object argument
---*/ ---*/
var __obj = {toString:function(){return 1;}} var __obj = {
toString: function() {
return 1;
}
}
var __str = "lego"; var __str = "lego";
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__str.charAt(__obj) !== "e") { if (__str.charAt(__obj) !== "e") {
$ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; __str.charAt(__obj) === "e". Actual: '+__str.charAt(__obj) ); $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = "lego"; __str.charAt(__obj) === "e". Actual: ' + __str.charAt(__obj));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -13,8 +13,8 @@ __instance.charAt = String.prototype.charAt;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) !== "fal") { 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) ); $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));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,7 +11,7 @@ description: Call charAt() function without argument of string object
//CHECK#1 //CHECK#1
//since ToInteger() evaluates to 0 charAt() evaluates to charAt(0) //since ToInteger() evaluates to 0 charAt() evaluates to charAt(0)
if ("lego".charAt() !== "l") { if ("lego".charAt() !== "l") {
$ERROR('#1: "lego".charAt() === "l". Actual: "lego".charAt() ==='+("lego".charAt()) ); $ERROR('#1: "lego".charAt() === "l". Actual: "lego".charAt() ===' + ("lego".charAt()));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -10,8 +10,12 @@ description: Call charAt() function with null argument of function object
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
//since ToInteger(null) evaluates to 0 charAt() evaluates to charAt(0) //since ToInteger(null) evaluates to 0 charAt() evaluates to charAt(0)
if (function(){return "lego"}().charAt(null) !== "l") { if (function() {
$ERROR('#1: function(){return "lego"}().charAt(null) === "l". Actual: function(){return "lego"}().charAt(null) ==='+function(){return "lego"}().charAt(null) ); return "lego"
}().charAt(null) !== "l") {
$ERROR('#1: function(){return "lego"}().charAt(null) === "l". Actual: function(){return "lego"}().charAt(null) ===' + function() {
return "lego"
}().charAt(null));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -13,7 +13,7 @@ description: >
//CHECK#1 //CHECK#1
//since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0) //since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0)
if (new String("lego").charAt(x) !== "l") { 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) ); $ERROR('#1: var x; new String("lego").charAt(x) === "l". Actual: new String("lego").charAt(x) ===' + new String("lego").charAt(x));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,7 +11,7 @@ description: Call charAt() function with undefined argument of string object
//CHECK#1 //CHECK#1
//since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0) //since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0)
if (String("lego").charAt(undefined) !== "l") { if (String("lego").charAt(undefined) !== "l") {
$ERROR('#1: String("lego").charAt(undefined) === "l". Actual: String("lego").charAt(undefined) ==='+String("lego").charAt(undefined) ); $ERROR('#1: String("lego").charAt(undefined) === "l". Actual: String("lego").charAt(undefined) ===' + String("lego").charAt(undefined));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -11,7 +11,7 @@ description: Call charAt() function with void 0 argument of string object
//CHECK#1 //CHECK#1
//since ToInteger(void 0) evaluates to 0 charAt() evaluates to charAt(0) //since ToInteger(void 0) evaluates to 0 charAt() evaluates to charAt(0)
if (String(42).charAt(void 0) !== "4") { if (String(42).charAt(void 0) !== "4") {
$ERROR('#1: String(42).charAt(void 0) === "4". Actual: String(42).charAt(void 0) ==='+String(42).charAt(void 0) ); $ERROR('#1: String(42).charAt(void 0) === "4". Actual: String(42).charAt(void 0) ===' + String(42).charAt(void 0));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -12,8 +12,8 @@ description: >
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
//since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0) //since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0)
if (new String(42).charAt(function(){}()) !== "4") { if (new String(42).charAt(function() {}()) !== "4") {
$ERROR('#1: new String(42).charAt(function(){}()) === "4". Actual: new String(42).charAt(function(){}()) ==='+new String(42).charAt(function(){}()) ); $ERROR('#1: new String(42).charAt(function(){}()) === "4". Actual: new String(42).charAt(function(){}()) ===' + new String(42).charAt(function() {}()));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -9,7 +9,7 @@ es5id: 15.5.4.4_A2
description: Call charAt(pos) with negative pos description: Call charAt(pos) with negative pos
---*/ ---*/
function __FACTORY(){}; function __FACTORY() {};
__FACTORY.prototype.charAt = String.prototype.charAt; __FACTORY.prototype.charAt = String.prototype.charAt;
@ -18,7 +18,7 @@ var __instance = new __FACTORY;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__instance.charAt(-1) !== "") { if (__instance.charAt(-1) !== "") {
$ERROR('#1: __instance.charAt(-1) === "". Actual: __instance.charAt(-1) ==='+__instance.charAt(-1) ); $ERROR('#1: __instance.charAt(-1) === "". Actual: __instance.charAt(-1) ===' + __instance.charAt(-1));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

Some files were not shown because too many files have changed in this diff Show More