(implementation: string)
| 69 | `; |
| 70 | |
| 71 | function host(implementation: string): string { |
| 72 | return `unit Host; |
| 73 | |
| 74 | interface |
| 75 | |
| 76 | uses Lib; |
| 77 | |
| 78 | type |
| 79 | THost = class |
| 80 | public |
| 81 | procedure Read; |
| 82 | procedure Fire; |
| 83 | function Count(O: TObject): Integer; |
| 84 | end; |
| 85 | |
| 86 | TOther = class |
| 87 | public |
| 88 | function Count(O: TObject): Integer; |
| 89 | end; |
| 90 | |
| 91 | implementation |
| 92 | |
| 93 | function THost.Count(O: TObject): Integer; begin Result := 0; end; |
| 94 | procedure THost.Read; begin end; |
| 95 | function TOther.Count(O: TObject): Integer; begin Result := 1; end; |
| 96 | |
| 97 | ${implementation} |
| 98 | |
| 99 | end. |
| 100 | `; |
| 101 | } |
| 102 | |
| 103 | describe('Pascal nested routines', () => { |
| 104 | it('indexes a nested routine as a function of its own, called by the routine that declares it', async () => { |
no outgoing calls
no test coverage detected