Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / String / prototype / toLocaleUpperCase / S15.5.4.19_A9.js
blobb411014e54ab259465edf5828214f7cd7a5df5b1
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: |
6     The String.prototype.toLocaleUpperCase.length property does not have the
7     attribute DontDelete
8 es5id: 15.5.4.19_A9
9 description: >
10     Checking if deleting the String.prototype.toLocaleUpperCase.length
11     property fails
12 ---*/
14 //////////////////////////////////////////////////////////////////////////////
15 //CHECK#0
16 if (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {
17   throw new Test262Error('#0: String.prototype.toLocaleUpperCase.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.toLocaleUpperCase.hasOwnProperty('length'));
20 //////////////////////////////////////////////////////////////////////////////
22 //////////////////////////////////////////////////////////////////////////////
23 //CHECK#1
24 if (!delete String.prototype.toLocaleUpperCase.length) {
25   throw new Test262Error('#1: delete String.prototype.toLocaleUpperCase.length return true');
28 //////////////////////////////////////////////////////////////////////////////
30 //////////////////////////////////////////////////////////////////////////////
31 //CHECK#2
32 if (String.prototype.toLocaleUpperCase.hasOwnProperty('length')) {
33   throw new Test262Error('#2: delete String.prototype.toLocaleUpperCase.length; String.prototype.toLocaleUpperCase.hasOwnProperty(\'length\') return false. Actual: ' + String.prototype.toLocaleUpperCase.hasOwnProperty('length'));
36 //////////////////////////////////////////////////////////////////////////////
38 reportCompare(0, 0);