js/src/jit-test/tests/auto-regress/bug732857.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Binary: cache/js-dbg-32-1fd6c40d3852-linux
michael@0 2 // Flags: --ion-eager
michael@0 3 //
michael@0 4
michael@0 5 function TestCase(n, d, e, a) {};
michael@0 6 this.__proto__ = [];
michael@0 7 var msPerDay = 86400000;
michael@0 8 var TIME_1900 = -2208988800000;
michael@0 9 function TimeFromYear( y ) {
michael@0 10 return ( msPerDay * DayFromYear(y) );
michael@0 11 }
michael@0 12 function DayFromYear( y ) {
michael@0 13 return ( 365*(y-1970) +
michael@0 14 Math.floor((y-1601)/400) );
michael@0 15 }
michael@0 16 function YearFromTime( t ) {
michael@0 17 var sign = ( t < 0 ) ? -1 : 1;
michael@0 18 var year = ( sign < 0 ) ? 1969 : 1970;
michael@0 19 return ( year );
michael@0 20 }
michael@0 21 var SECTION = "15.9.5.10";
michael@0 22 addTestCase( TIME_1900 );
michael@0 23 function addTestCase( t ) {
michael@0 24 var start = TimeFromYear(YearFromTime(t));
michael@0 25 var stop = TimeFromYear(YearFromTime(t) + 1);
michael@0 26 for (var d = start; d < stop; d += msPerDay) {
michael@0 27 new TestCase( SECTION,
michael@0 28 (new Date( SECTION ? "Failed" : prototype += "'abc'.search(new RegExp('^'))") ).getDate() );
michael@0 29 }
michael@0 30 }

mercurial