(mode)
| 151 | }); |
| 152 | |
| 153 | function outputGraphicalArray(mode) { |
| 154 | const gpu = new GPU({ mode }); |
| 155 | const mockContext = { |
| 156 | getExtension: () => {} |
| 157 | }; |
| 158 | const mockCanvas = { |
| 159 | getContext: () => mockContext, |
| 160 | }; |
| 161 | assert.throws(() => { |
| 162 | const kernel = gpu.createKernel(function(input) { |
| 163 | return input[this.thread.x]; |
| 164 | }, { |
| 165 | canvas: mockCanvas, |
| 166 | output: [5], |
| 167 | graphical: true |
| 168 | }); |
| 169 | kernel([1]); |
| 170 | }, new Error('Output must have 2 dimensions on graphical mode')); |
| 171 | gpu.destroy(); |
| 172 | } |
| 173 | |
| 174 | test('graphical output array auto', () => { |
| 175 | outputGraphicalArray(); |
no test coverage detected
searching dependent graphs…