js/src/tests/ecma_3/FunExpr/regress-533254.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/ecma_3/FunExpr/regress-533254.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +/*
     1.5 + * Any copyright is dedicated to the Public Domain.
     1.6 + * http://creativecommons.org/licenses/publicdomain/
     1.7 + */
     1.8 +
     1.9 +var BUGNUMBER = 533254;
    1.10 +var summary = 'init-method late in table-big initialiser screwup';
    1.11 +
    1.12 +printBugNumber(BUGNUMBER);
    1.13 +printStatus(summary);
    1.14 +
    1.15 +function f() {
    1.16 +    var proto = {p8:8};
    1.17 +    var obj = {
    1.18 +        p0:0, p1:1, p2:2, p3:3, p4:4, p5:5, p6:6, p7:7, p8:8, p9:9, 
    1.19 +        p10:0, p11:1, p12:2, p13:3, p14:4, p15:5, p16:6, p17:7, p18:8, p19:9, 
    1.20 +        m: function() { return 42; }
    1.21 +    };
    1.22 +    return obj;
    1.23 +}
    1.24 +var expect = f(),
    1.25 +    actual = f();
    1.26 +
    1.27 +expect += '';
    1.28 +actual += '';
    1.29 +reportCompare(expect, actual, summary);
    1.30 +
    1.31 +printStatus("All tests passed!");

mercurial