nodejs/deps/v8/test/mjsunit/regress/regress-165637.js

11 lines
481 B
JavaScript
Raw Permalink Normal View History

2013-03-18 13:49:34 -07:00
// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
2011-01-19 11:06:13 -08:00
2013-03-18 13:49:34 -07:00
// Make sure that packed and unpacked array slices are still properly handled
var holey_array = [1, 2, 3, 4, 5,,,,,,];
assertEquals(new Array(1), holey_array.slice(6, 7));
assertEquals(undefined, holey_array.slice(6, 7)[0]);
assertEquals([], holey_array.slice(2, 1));
assertEquals(3, holey_array.slice(2, 3)[0]);