js/src/jit-test/tests/basic/function-tosource-getset.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/function-tosource-getset.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,7 @@
     1.4 +var o = {get prop() a + b, set prop(x) a + b};
     1.5 +var prop = Object.getOwnPropertyDescriptor(o, "prop");
     1.6 +assertEq(prop.get.toString(), "function () a + b");
     1.7 +assertEq(prop.get.toSource(), "(function () a + b)");
     1.8 +assertEq(prop.set.toString(), "function (x) a + b");
     1.9 +assertEq(prop.set.toSource(), "(function (x) a + b)");
    1.10 +assertEq(o.toSource(), "({get prop () a + b, set prop (x) a + b})");

mercurial