michael@0: function f1(a, b) { michael@0: return a + b; michael@0: } michael@0: assertEq(f1.toString(), "function f1(a, b) {\n return a + b;\n}"); michael@0: assertEq(f1.toSource(), f1.toString()); michael@0: function f2(a, /* ))))pernicious comment */ b, michael@0: c, // another comment(( michael@0: d) {} michael@0: assertEq(f2.toString(), "function f2(a, /* ))))pernicious comment */ b,\n c, // another comment((\n d) {}"); michael@0: assertEq(decompileBody(f2), ""); michael@0: function f3() { } michael@0: assertEq(f3.toString(), "function f3() { }"); michael@0: assertEq(decompileBody(f3), " ");