diff options
Diffstat (limited to 'js/src/tests/non262/JSON/immutable.js')
-rw-r--r-- | js/src/tests/non262/JSON/immutable.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/tests/non262/JSON/immutable.js b/js/src/tests/non262/JSON/immutable.js new file mode 100644 index 0000000000..e84dc3612a --- /dev/null +++ b/js/src/tests/non262/JSON/immutable.js @@ -0,0 +1,13 @@ +// |reftest| skip-if(!this.hasOwnProperty("Record")) + +assertEq( + JSON.parseImmutable('{"x":1,"a":[1,2,{},[]]}'), + #{ x: 1, a: #[1, 2, #{}, #[]] } +); + +assertEq( + JSON.parseImmutable('{"a":1,"a":2}'), + #{ a: 2 } +); + +if (typeof reportCompare === "function") reportCompare(0, 0); |