2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
5 * Jeff Walden <jwalden+code@mit.edu>
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 600392;
11 'Object.preventExtensions([]).length = 0 should do nothing, not throw';
13 print(BUGNUMBER + ": " + summary);
23 assertEq(a.length, 0);
24 assertEq(Object.preventExtensions(a), a);
25 assertEq(a.length, 0);
27 assertEq(a.length, 0);
31 function testEmptyStrict()
35 assertEq(a.length, 0);
36 assertEq(Object.preventExtensions(a), a);
37 assertEq(a.length, 0);
39 assertEq(a.length, 0);
43 function testNonEmpty()
46 assertEq(a.length, 3);
47 assertEq(Object.preventExtensions(a), a);
48 assertEq(a.length, 3);
50 assertEq(a.length, 0);
54 function testNonEmptyStrict()
58 assertEq(a.length, 3);
59 assertEq(Object.preventExtensions(a), a);
60 assertEq(a.length, 3);
62 assertEq(a.length, 0);
66 /******************************************************************************/
68 if (typeof reportCompare === "function")
69 reportCompare(true, true);
71 print("All tests passed!");