summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/function-tosource-getset.js
blob: 1804d38f2f07807b79da29f3fadb974e83a239e7 (plain)
1
2
3
4
5
6
7
var o = {get prop() a + b, set prop(x) a + b};
var prop = Object.getOwnPropertyDescriptor(o, "prop");
assertEq(prop.get.toString(), "get prop() { a + b; }");
assertEq(prop.get.toSource(), "get prop() { a + b; }");
assertEq(prop.set.toString(), "set prop(x) { a + b; }");
assertEq(prop.set.toSource(), "set prop(x) { a + b; }");
assertEq(o.toSource(), "({get prop() { a + b; }, set prop(x) { a + b; }})");