bug702915.js (3430B)
1 // Binary: cache/js-dbg-64-d51bd1645a2f-linux 2 // Flags: -m -n -a 3 // 4 gczeal(4); 5 var callStack = new Array(); 6 var gTestcases = new Array(); 7 var gTc = gTestcases.length; 8 function TestCase(n, d, e, a) { 9 this.name = n; 10 this.description = d; 11 this.expect = e; 12 this.actual = a; 13 this.passed = getTestCaseResult(e, a); 14 this.reason = ''; 15 this.bugnumber = ''; 16 this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); 17 gTestcases[gTc++] = this; 18 } 19 function enterFunc (funcName) { 20 try { throw foo; } catch(ex) {} 21 } 22 function getTestCaseResult(expected, actual) {} 23 function writeHeaderToLog( string ) {} 24 var lfcode = new Array(); 25 lfcode.push("\ 26 var code = ''; \ 27 code+=createCode((gczeal(2))); \ 28 function createCode(i) { \ 29 jstop+= + delete + i + \" string.';\"; \ 30 } \ 31 "); 32 lfcode.push("\ 33 var SECTION = '9.9-1'; \ 34 new TestCase( SECTION, '(Object(true)).__proto__', Boolean.prototype, (Object(true)).__proto__ ); \ 35 new TestCase( SECTION, '(Object(1)).__proto__', Number.prototype, (Object(1)).__proto__ ); \ 36 new TestCase( SECTION, '(Object(-1)).__proto__', Number.prototype, (Object(-1)).__proto__ ); \ 37 new TestCase( SECTION, '(Object(Number.MAX_VALUE)).__proto__', Number.prototype, (Object(Number.MAX_VALUE)).__proto__ ); \ 38 new TestCase( SECTION, '(Object(Number.MIN_VALUE)).__proto__', Number.prototype, (Object(Number.MIN_VALUE)).__proto__ ); \ 39 new TestCase( SECTION, '(Object(Number.POSITIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.POSITIVE_INFINITY)).__proto__ ); \ 40 new TestCase( SECTION, '(Object(Number.NEGATIVE_INFINITY)).__proto__', Number.prototype, (Object(Number.NEGATIVE_INFINITY)).__proto__ ); \ 41 new TestCase( SECTION, '(Object(Number.NaN)).__proto__', Number.prototype, (Object(Number.NaN)).__proto__ ); \ 42 new TestCase( ) ; \ 43 new TestCase( SECTION, '(Object(\"\")).__proto__', String.prototype, (Object('')).__proto__ ); \ 44 new TestCase( SECTION, \"(Object('foo')).__proto__\", String.prototype, (Object('foo')).__proto__ ); \ 45 new TestCase( SECTION, \"Object( '' ).__proto__\", String.prototype, (Object(\"\")).__proto__ ); \ 46 new TestCase( SECTION, '(Object( new MyObject(true) )).toString()', '[object Object]', eval('(Object( new MyObject(true) )).toString()') ); \ 47 "); 48 lfcode.push("jsTestDriverEnd();"); 49 lfcode.push(""); 50 lfcode.push("\ 51 enterFunc ('test'); \ 52 Array.prototype[1] = 'bar'; \ 53 var a = []; \ 54 exitFunc ('test'); \ 55 "); 56 lfcode.push(""); 57 lfcode.push("\ 58 var VERSION = 'ECMA_1'; \ 59 var TITLE = 'Value Properties of the Math Object'; \ 60 writeHeaderToLog( SECTION + ' '+ TITLE); \ 61 new TestCase( '15.8.1.1', 'Math.E', \ 62 this . TITLE ); \ 63 'typeof Math.E', \ 64 new TestCase( '15.8.1.2', \ 65 'Math.LN10', \ 66 'typeof Math.LN10', \ 67 typeof Math.LN10 ); \ 68 new TestCase( '15.8.1.3', \ 69 'Math.LN2', \ 70 Math.LN2 ); \ 71 new TestCase( '15.8.1.3', \ 72 Math.LOG2E ); \ 73 new TestCase( '15.8.1.4', \ 74 Math.SQRT1_2); \ 75 new TestCase( '15.8.1.7', \ 76 typeof Math.SQRT2 ); \ 77 new TestCase( SECTION, \ 78 eval('var MATHPROPS=\"\";for( p in Math ){ MATHPROPS +=p; };MATHPROPS') ); \ 79 "); 80 while (true) { 81 var file = lfcode.shift(); if (file == undefined) { break; } 82 try { 83 eval(file); 84 } catch(exc1) { print(exc1); }; 85 }