2 "This test case checks whether variables cause properties to be defined even before reaching the declaration statement in various cases."
5 shouldBeTrue('this.hasOwnProperty("foo")');
9 shouldBeTrue('this.hasOwnProperty("bar")');
12 var firstEvalResult = eval('var result = this.hasOwnProperty("y"); var y = 3; result');
13 shouldBeTrue("firstEvalResult");
15 var secondEvalResult = eval('delete x; var result = this.hasOwnProperty("x"); var x = 3; result');
16 shouldBeFalse("secondEvalResult");
18 var thirdEvalResult = false;
20 thirdEvalResult = (function(){ var x=false; try { throw ""; } catch (e) { eval("var x = true;"); } return x; })();
22 thirdEvalResult = "Threw exception!";
24 shouldBeTrue("thirdEvalResult");