summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/String/prototype/split/checking-if-deleting-the-string-prototype-split-length-property-fails.js
blob: fb4decb365bd44fb333dd0b83bcc64944c1ea9bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: |
    The String.prototype.split.length property does not have the attribute
    DontDelete
es5id: 15.5.4.14_A9
description: >
    Checking if deleting the String.prototype.split.length property
    fails
---*/

assert(
  String.prototype.split.hasOwnProperty('length'),
  'String.prototype.split.hasOwnProperty(\'length\') must return true'
);

assert(delete String.prototype.split.length, 'The value of `delete String.prototype.split.length` is true');

assert(
  !String.prototype.split.hasOwnProperty('length'),
  'The value of `!String.prototype.split.hasOwnProperty(\'length\')` is true'
);

reportCompare(0, 0);