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_A8.js
blob43939e080b08842f6dd46b3f26f89dec783b6fad
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 has the attribute
7     DontEnum
8 es5id: 15.5.4.19_A8
9 description: >
10     Checking if enumerating the
11     String.prototype.toLocaleUpperCase.length 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 //////////////////////////////////////////////////////////////////////////////
23 //////////////////////////////////////////////////////////////////////////////
24 // CHECK#1
25 if (String.prototype.toLocaleUpperCase.propertyIsEnumerable('length')) {
26   throw new Test262Error('#1: String.prototype.toLocaleUpperCase.propertyIsEnumerable(\'length\') return false');
29 //////////////////////////////////////////////////////////////////////////////
31 //////////////////////////////////////////////////////////////////////////////
32 // CHECK#2
33 var count = 0;
35 for (var p in String.prototype.toLocaleUpperCase) {
36   if (p === "length") count++;
39 if (count !== 0) {
40   throw new Test262Error('#2: count=0; for (p in String.prototype.toLocaleUpperCase){if (p==="length") count++;}; count === 0. Actual: ' + count);
43 //////////////////////////////////////////////////////////////////////////////
45 reportCompare(0, 0);