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