michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 664528; michael@0: var summary = michael@0: "Sorting an array containing only holes and |undefined| should move all " + michael@0: "|undefined| to the start of the array"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: var a = [, , , undefined]; michael@0: a.sort(); michael@0: michael@0: assertEq(a.hasOwnProperty(0), true); michael@0: assertEq(a[0], undefined); michael@0: assertEq(a.hasOwnProperty(1), false); michael@0: assertEq(a.hasOwnProperty(2), false); michael@0: assertEq(a.hasOwnProperty(3), false); michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("Tests complete");