diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/test262/built-ins/Object/prototype/toLocaleString/primitive_this_value-strict.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/primitive_this_value-strict.js b/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/primitive_this_value-strict.js new file mode 100644 index 0000000000..d606e49552 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/primitive_this_value-strict.js @@ -0,0 +1,22 @@ +'use strict'; +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Object.prototype.toLocaleString called with primitive thisValue +info: | + 19.1.3.5 Object.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ) + + ... + 2. Return Invoke(O, "toString"). +es6id: 19.1.3.5 +flags: [onlyStrict] +---*/ + +Boolean.prototype.toString = function() { + return typeof this; +}; + +assert.sameValue(true.toLocaleString(), "boolean"); + +reportCompare(0, 0); |