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_A7.js
blobfbde6f10439aef8193bb974771f82b4032e9e192
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: String.prototype.toLocaleUpperCase can't be used as constructor
6 es5id: 15.5.4.19_A7
7 description: >
8     Checking if creating the String.prototype.toLocaleUpperCase object
9     fails
10 ---*/
12 var __FACTORY = String.prototype.toLocaleUpperCase;
14 try {
15   var __instance = new __FACTORY;
16   throw new Test262Error('#1: __FACTORY = String.prototype.toLocaleUpperCase; "__instance = new __FACTORY" lead to throwing exception');
17 } catch (e) {
18   if ((e instanceof TypeError) !== true) {
19     throw new Test262Error('#1.1:  var __instance = new __FACTORY;  Object has no construct lead  a TypeError. Actual: ' + (e));
20   }
23 reportCompare(0, 0);