summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Record/json.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/Record/json.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/tests/non262/Record/json.js b/js/src/tests/non262/Record/json.js
new file mode 100644
index 0000000000..8a327f2eea
--- /dev/null
+++ b/js/src/tests/non262/Record/json.js
@@ -0,0 +1,13 @@
+// |reftest| skip-if(!this.hasOwnProperty("Record"))
+
+assertEq(
+ JSON.stringify(#{ x: 1, a: #[1, 2, #{}, #[]] }),
+ '{"a":[1,2,{},[]],"x":1}'
+);
+
+assertEq(
+ JSON.stringify({ rec: Object(#{ x: 1 }), tup: Object(#[1, 2]) }),
+ '{"rec":{"x":1},"tup":[1,2]}'
+);
+
+if (typeof reportCompare === "function") reportCompare(0, 0);