Chromium Code Reviews| Index: test/mjsunit/array-sort.js |
| =================================================================== |
| --- test/mjsunit/array-sort.js (revision 404) |
| +++ test/mjsunit/array-sort.js (working copy) |
| @@ -131,3 +131,12 @@ |
| } |
| TestArraySortingWithHoles(); |
| + |
| +// Test array sorting with undefined elemeents in the array. |
| +function TestArraySortingWithUndefined() { |
| + var a = [3, void 0, 2]; |
| + a.sort(); |
| + assertArrayEquals([ 2, 3, void 0], a); |
| +} |
| + |
| +TestArraySortingWithUndefined(); |