diff options
Diffstat (limited to 'js/src/tests/ecma_6/Object/toLocaleString.js')
-rw-r--r-- | js/src/tests/ecma_6/Object/toLocaleString.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Object/toLocaleString.js b/js/src/tests/ecma_6/Object/toLocaleString.js new file mode 100644 index 000000000..3fa2acc74 --- /dev/null +++ b/js/src/tests/ecma_6/Object/toLocaleString.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(String.prototype, "toString", { + get() { + assertEq(typeof this, "string"); + + return function() { return typeof this; }; + } +}) +assertEq(Object.prototype.toLocaleString.call("test"), "string"); + +if (typeof reportCompare === "function") + reportCompare(true, true); |