diff options
Diffstat (limited to 'js/src/tests/non262/object/toLocaleString-01.js')
-rw-r--r-- | js/src/tests/non262/object/toLocaleString-01.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/tests/non262/object/toLocaleString-01.js b/js/src/tests/non262/object/toLocaleString-01.js new file mode 100644 index 0000000000..3fa2acc746 --- /dev/null +++ b/js/src/tests/non262/object/toLocaleString-01.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); |