| "Test method-check related bugs" |
| // This test yields PASS, if malloc does not reuse the memory address for the structure of String prototype |
| String.prototype.a = function() { } |
| String.prototype.b = function() { } |
| // The following 3 lines cause gc() flush on a Debian |
| // Linux machine, but there is no garantee, it works on |
| // any other computer. (Not even another Debian Linux) |
| // If func2() is not called or a much bigger or lower |
| // value than 5000 is chosen, the crash won't happen |
| for (var i = 0; i < 5000; ++i) |
| for (var i = 0; i < 5; ++i) |
| // Test that method caching correctly invalidates (doesn't incorrectly continue to call a previously cached function). |
| makeCall: function(callback) |
| this.callback = callback; |
| for (var i=0; i<100; ++i) |
| totalizer.makeCall(addOne); |
| totalizer.makeCall(addOneHundred); |
| shouldBe('total', '200'); |
| var successfullyParsed = true; |