michael@0: // Binary: cache/js-dbg-32-1fd6c40d3852-linux michael@0: // Flags: --ion-eager michael@0: // michael@0: michael@0: function TestCase(n, d, e, a) {}; michael@0: this.__proto__ = []; michael@0: var msPerDay = 86400000; michael@0: var TIME_1900 = -2208988800000; michael@0: function TimeFromYear( y ) { michael@0: return ( msPerDay * DayFromYear(y) ); michael@0: } michael@0: function DayFromYear( y ) { michael@0: return ( 365*(y-1970) + michael@0: Math.floor((y-1601)/400) ); michael@0: } michael@0: function YearFromTime( t ) { michael@0: var sign = ( t < 0 ) ? -1 : 1; michael@0: var year = ( sign < 0 ) ? 1969 : 1970; michael@0: return ( year ); michael@0: } michael@0: var SECTION = "15.9.5.10"; michael@0: addTestCase( TIME_1900 ); michael@0: function addTestCase( t ) { michael@0: var start = TimeFromYear(YearFromTime(t)); michael@0: var stop = TimeFromYear(YearFromTime(t) + 1); michael@0: for (var d = start; d < stop; d += msPerDay) { michael@0: new TestCase( SECTION, michael@0: (new Date( SECTION ? "Failed" : prototype += "'abc'.search(new RegExp('^'))") ).getDate() ); michael@0: } michael@0: }