2 "This tests an early experimental implementation of ES6-esque private names."
13 var prop
= Name("prop");
16 shouldBeFalse("prop in o");
17 shouldBeFalse("'prop' in o");
18 shouldBe("Object.getOwnPropertyNames(o).length", '0');
19 shouldBe("forIn(o)", '[]');
23 shouldBeTrue("prop in o");
24 shouldBeFalse("'prop' in o");
25 shouldBe("Object.getOwnPropertyNames(o).length", '0');
26 shouldBe("forIn(o)", '[]');
30 shouldBe("o[prop]", '42');
31 shouldBe("o['prop']", '101');
32 shouldBe("Object.getOwnPropertyNames(o).length", '1');
33 shouldBe("forIn(o)", '["prop"]');
37 shouldBeFalse("prop in o");
38 shouldBeTrue("'prop' in o");
39 shouldBe("Object.getOwnPropertyNames(o).length", '1');
40 shouldBe("forIn(o)", '["prop"]');
42 successfullyParsed
= true;