michael@0: var gTestcases = new Array(); michael@0: function TestCase(n, d, e, a) { michael@0: this.name = n; michael@0: this.description = d; michael@0: this.expect = e; michael@0: this.actual = a; michael@0: this.passed = getTestCaseResult(e, a); michael@0: options.stackvalues = []; michael@0: function getTestCaseResult(expected, actual) { } michael@0: } michael@0: var lfcode = new Array(); michael@0: lfcode.push("3"); michael@0: lfcode.push("var statusitems = [];\ michael@0: var actualvalues = [];\ michael@0: var expectedvalues = [];\ michael@0: actual = '$a$^'.replace(/\\$\\^/, '--');\ michael@0: actual = 'ababc'.replace(/abc/, '--');\ michael@0: actual = 'ababc'.replace(/abc/g, '--');\ michael@0: "); michael@0: lfcode.push("\ michael@0: var SECTION = \"15.4.4.3-1\";\ michael@0: new TestCase( SECTION, \"Array.prototype.join.length\", 1, Array.prototype.join.length );\ michael@0: new TestCase( SECTION, \"delete Array.prototype.join.length\", false, delete Array.prototype.join.length );\ michael@0: new TestCase( SECTION, \"delete Array.prototype.join.length; Array.prototype.join.length\", 1, eval(\"delete Array.prototype.join.length; Array.prototype.join.length\") );\ michael@0: new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(); TEST_ARRAY.join()\") );\ michael@0: new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(); TEST_ARRAY.join(' ')\") );\ michael@0: new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join('&')\") );\ michael@0: new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join('')\") );\ michael@0: new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join(void 0)\") );\ michael@0: new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join()\") );\ michael@0: new TestCase( SECTION, eval(\"var TEST_ARRAY = new Array(true); TEST_ARRAY.join('\\v')\") );\ michael@0: SEPARATOR = \"\\t\";\ michael@0: new TestCase( SECTION,TEST_ARRAY.join( SEPARATOR ) );\ michael@0: "); michael@0: lfcode.push("new TestCase( assertEq, \"String.prototype.toString()\", \"\", String.prototype.toString() );\ michael@0: new TestCase( SECTION, \"(new String()).toString()\", \"\", (new String()).toString() );\ michael@0: new TestCase( SECTION, \"(new String(\\\"\\\")).toString()\", \"\", (new String(\"\")).toString() );\ michael@0: new TestCase( SECTION, \"(new String( String() )).toString()\",\"\", (new String(String())).toString() );\ michael@0: gczeal(4);\ michael@0: new TestCase( SECTION, \"(new String( 0 )).toString()\", \"0\", (new String((1))).toString() );\ michael@0: "); michael@0: while (true) { michael@0: var file = lfcode.shift(); if (file == undefined) { break; } michael@0: loadFile(file); michael@0: } michael@0: function loadFile(lfVarx) { michael@0: try { michael@0: if (lfVarx.substr(-3) == ".js") { michael@0: } else if (!isNaN(lfVarx)) { michael@0: lfRunTypeId = lfVarx; michael@0: } else { michael@0: switch (lfRunTypeId) { michael@0: default: evaluate(lfVarx); michael@0: } michael@0: } michael@0: } catch (lfVare) {} michael@0: }