michael@0: // Binary: cache/js-dbg-64-d51bd1645a2f-linux michael@0: // Flags: -m -n -a michael@0: // michael@0: gczeal(4); michael@0: var callStack = new Array(); michael@0: var gTestcases = new Array(); michael@0: var gTc = gTestcases.length; 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: this.reason = ''; michael@0: this.bugnumber = ''; michael@0: this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); michael@0: gTestcases[gTc++] = this; michael@0: } michael@0: function enterFunc (funcName) { michael@0: try { throw foo; } catch(ex) {} michael@0: } michael@0: function getTestCaseResult(expected, actual) {} michael@0: function writeHeaderToLog( string ) {} michael@0: var lfcode = new Array(); michael@0: lfcode.push("\ michael@0: var code = ''; \ michael@0: code+=createCode((gczeal(2))); \ michael@0: function createCode(i) { \ michael@0: jstop+= + delete + i + \" string.';\"; \ michael@0: } \ michael@0: "); michael@0: lfcode.push("\ michael@0: var SECTION = '9.9-1'; \ michael@0: new TestCase( SECTION, '(Object(true)).__proto__', Boolean.prototype, (Object(true)).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object(1)).__proto__', Number.prototype, (Object(1)).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object(-1)).__proto__', Number.prototype, (Object(-1)).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object(Number.MAX_VALUE)).__proto__', Number.prototype, (Object(Number.MAX_VALUE)).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object(Number.MIN_VALUE)).__proto__', Number.prototype, (Object(Number.MIN_VALUE)).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object(Number.POSITIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.POSITIVE_INFINITY)).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object(Number.NEGATIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.NEGATIVE_INFINITY)).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object(Number.NaN)).__proto__', Number.prototype, (Object(Number.NaN)).__proto__ ); \ michael@0: new TestCase( ) ; \ michael@0: new TestCase( SECTION, '(Object(\"\")).__proto__', String.prototype, (Object('')).__proto__ ); \ michael@0: new TestCase( SECTION, \"(Object('foo')).__proto__\", String.prototype, (Object('foo')).__proto__ ); \ michael@0: new TestCase( SECTION, \"Object( '' ).__proto__\", String.prototype, (Object(\"\")).__proto__ ); \ michael@0: new TestCase( SECTION, '(Object( new MyObject(true) )).toString()', '[object Object]', eval('(Object( new MyObject(true) )).toString()') ); \ michael@0: "); michael@0: lfcode.push("jsTestDriverEnd();"); michael@0: lfcode.push(""); michael@0: lfcode.push("\ michael@0: enterFunc ('test'); \ michael@0: Array.prototype[1] = 'bar'; \ michael@0: var a = []; \ michael@0: exitFunc ('test'); \ michael@0: "); michael@0: lfcode.push(""); michael@0: lfcode.push("\ michael@0: var VERSION = 'ECMA_1'; \ michael@0: var TITLE = 'Value Properties of the Math Object'; \ michael@0: writeHeaderToLog( SECTION + ' '+ TITLE); \ michael@0: new TestCase( '15.8.1.1', 'Math.E', \ michael@0: this . TITLE ); \ michael@0: 'typeof Math.E', \ michael@0: new TestCase( '15.8.1.2', \ michael@0: 'Math.LN10', \ michael@0: 'typeof Math.LN10', \ michael@0: typeof Math.LN10 ); \ michael@0: new TestCase( '15.8.1.3', \ michael@0: 'Math.LN2', \ michael@0: Math.LN2 ); \ michael@0: new TestCase( '15.8.1.3', \ michael@0: Math.LOG2E ); \ michael@0: new TestCase( '15.8.1.4', \ michael@0: Math.SQRT1_2); \ michael@0: new TestCase( '15.8.1.7', \ michael@0: typeof Math.SQRT2 ); \ michael@0: new TestCase( SECTION, \ michael@0: eval('var MATHPROPS=\"\";for( p in Math ){ MATHPROPS +=p; };MATHPROPS') ); \ michael@0: "); michael@0: while (true) { michael@0: var file = lfcode.shift(); if (file == undefined) { break; } michael@0: try { michael@0: eval(file); michael@0: } catch(exc1) { print(exc1); }; michael@0: }