js/src/tests/ecma_3/Regress/regress-580544.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/ecma_3/Regress/regress-580544.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +// Any copyright is dedicated to the Public Domain.
     1.5 +// http://creativecommons.org/licenses/publicdomain/
     1.6 +
     1.7 +var gTestfile = 'regress-580544.js';
     1.8 +//-----------------------------------------------------------------------------
     1.9 +var BUGNUMBER = 580544;
    1.10 +var summary = 'Do not assert: new (this.prototype = this)';
    1.11 +var actual = 'No Crash';
    1.12 +var expect = 'No Crash';
    1.13 +
    1.14 +
    1.15 +//-----------------------------------------------------------------------------
    1.16 +test();
    1.17 +//-----------------------------------------------------------------------------
    1.18 +
    1.19 +function test()
    1.20 +{
    1.21 +  enterFunc ('test');
    1.22 +  printBugNumber(BUGNUMBER);
    1.23 +  printStatus (summary);
    1.24 +
    1.25 +  try {
    1.26 +    new (this.prototype = this);
    1.27 +  } catch (e) {
    1.28 +  }
    1.29 +
    1.30 +  reportCompare(expect, actual, summary);
    1.31 +
    1.32 +  exitFunc ('test');
    1.33 +}

mercurial