summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Array/toLocaleString.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_6/Array/toLocaleString.js')
-rw-r--r--js/src/tests/ecma_6/Array/toLocaleString.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Array/toLocaleString.js b/js/src/tests/ecma_6/Array/toLocaleString.js
new file mode 100644
index 000000000..4a16cb4a4
--- /dev/null
+++ b/js/src/tests/ecma_6/Array/toLocaleString.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(String.prototype, "toLocaleString", {
+ get() {
+ assertEq(typeof this, "string");
+
+ return function() { return typeof this; };
+ }
+})
+
+assertEq(["test"].toLocaleString(), "string");
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);