1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 esid: sec-string.prototype.tolocaleuppercase
5 description: The "this" value must be object-coercible
7 This function works exactly the same as toUpperCase except that its result is
8 intended to yield the correct result for the host environment's current
9 locale, rather than a locale-independent result.
11 21.1.3.26 String.prototype.toUpperCase
13 This function behaves in exactly the same way as
14 String.prototype.toLowerCase, except that code points are mapped to their
15 uppercase equivalents as specified in the Unicode Character Database.
17 21.1.3.24 String.prototype.toLowerCase
19 1. Let O be ? RequireObjectCoercible(this value).
22 var toLocaleUpperCase = String.prototype.toLocaleUpperCase;
24 assert.sameValue(typeof toLocaleUpperCase, 'function');
26 assert.throws(TypeError, function() {
27 toLocaleUpperCase.call(undefined);
30 assert.throws(TypeError, function() {
31 toLocaleUpperCase.call(null);