| Tests the coverage highlight in sources after the recording finishes. |
| |
| 0: + function outer(index) { |
| 1: |
| 2: - function inner1(a) { |
| 3: - return a + 1; |
| 4: - } |
| 5: |
| 6: + function inner2(a) { |
| 7: + return a + 2; |
| 8: + } |
| 9: |
| 10: + function inner3(a) { return a + 3; } function inner4(a) { return a + 4; } function inner5(a) { return a + 5; } |
| 11: |
| 12: + if (index === 7) { |
| 13: - console.error('This will never happen!'); |
| 14: - } |
| 15: |
| 16: + // Make sure these are not collected. |
| 17: + if (!self.__funcs) |
| 18: + self.__funcs = [inner1, inner2, inner3, inner4, inner5]; |
| 19: + return self.__funcs[index]; |
| 20: + } |
| 21: |
| 22: + function performActions() { |
| 23: + return outer(1)(0) + outer(3)(0); |
| 24: + } function outer2() { |
| 25: - return outer(0)(0); |
| 26: - } |
| 27: |
| |