mirror of
https://github.com/tc39/test262.git
synced 2025-08-28 13:28:38 +02:00
31 lines
998 B
JavaScript
31 lines
998 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/**
|
|
* The length property of splice has the attribute DontDelete
|
|
*
|
|
* @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.2.js
|
|
* @description Checking use hasOwnProperty, delete
|
|
* @noStrict
|
|
*/
|
|
|
|
//CHECK#1
|
|
if (Array.prototype.splice.hasOwnProperty('length') !== true) {
|
|
$FAIL('#1: Array.prototype.splice.hasOwnProperty(\'length\') === true. Actual: ' + (Array.prototype.splice.hasOwnProperty('length')));
|
|
}
|
|
|
|
delete Array.prototype.splice.length;
|
|
|
|
//CHECK#2
|
|
if (Array.prototype.splice.hasOwnProperty('length') !== true) {
|
|
$ERROR('#2: delete Array.prototype.splice.length; Array.prototype.splice.hasOwnProperty(\'length\') === true. Actual: ' + (Array.prototype.splice.hasOwnProperty('length')));
|
|
}
|
|
|
|
//CHECK#3
|
|
if (Array.prototype.splice.length === undefined) {
|
|
$ERROR('#3: delete Array.prototype.splice.length; Array.prototype.splice.length !== undefined');
|
|
}
|
|
|
|
|
|
|