1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
5 info: String.prototype.toLocaleUpperCase()
6 es5id: 15.5.4.19_A1_T13
8 Override toString and valueOf functions, then call
9 toLocaleUpperCase() function for this object
13 toString: function() {
20 __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;
21 //////////////////////////////////////////////////////////////////////////////
23 if (__obj.toLocaleUpperCase() !== "1") {
24 throw new Test262Error('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase() ==="1". Actual: ' + __obj.toLocaleUpperCase());
27 //////////////////////////////////////////////////////////////////////////////
29 //////////////////////////////////////////////////////////////////////////////
31 if (__obj.toLocaleUpperCase().length !== 1) {
32 throw new Test262Error('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase().length === 1. Actual: ' + __obj.toLocaleUpperCase().length);
35 //////////////////////////////////////////////////////////////////////////////