summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/JSON/immutable.js
blob: e84dc3612ac24e703478abfc9851cdf0a905642f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);