| function shouldBe(actual, expected) { |
| throw new Error('bad value: ' + actual); |
| function shouldThrow(func, errorMessage) { |
| throw new Error('not thrown'); |
| if (String(error) !== errorMessage) |
| throw new Error(`bad error: ${String(error)}`); |
| Function("@", { toString() { throw 42; } }) |
| shouldBe(this.index, counter); |
| shouldBe(this.index, counter); |
| for (var i = 0; i < 50; ++i) { |
| parameters.push(new Parameter(parameters.length)); |
| var args = parameters.slice(); |
| args.push(new Body(args.length)); |
| Function.apply(this, args); |
| shouldBe(counter, args.length); |