(irqRate: number)
| 169 | describe('IRQ', () => { |
| 170 | describe('irqSleep is function', () => { |
| 171 | async function countSleeps(irqRate: number): Promise<number> { |
| 172 | let count = 0; |
| 173 | const interpreter = new Interpreter({}, { |
| 174 | irqRate, |
| 175 | // It's safe only when no massive loop occurs |
| 176 | irqSleep: async () => count++, |
| 177 | }); |
| 178 | await interpreter.exec(Parser.parse(` |
| 179 | 'Ai-chan kawaii' |
| 180 | 'Ai-chan kawaii' |
| 181 | 'Ai-chan kawaii' |
| 182 | 'Ai-chan kawaii' |
| 183 | 'Ai-chan kawaii' |
| 184 | 'Ai-chan kawaii' |
| 185 | 'Ai-chan kawaii' |
| 186 | 'Ai-chan kawaii' |
| 187 | 'Ai-chan kawaii' |
| 188 | 'Ai-chan kawaii'`)); |
| 189 | return count; |
| 190 | } |
| 191 | |
| 192 | test.concurrent.each([ |
| 193 | [0, 0], |
no test coverage detected