* * @param {Kernel} Kernel
(Kernel)
| 8 | * @param {Kernel} Kernel |
| 9 | */ |
| 10 | function argumentTypesTest(Kernel) { |
| 11 | const kernel = new Kernel(`function(value) { return value[this.thread.x]; }`, { |
| 12 | output: [1], |
| 13 | functionBuilder: { |
| 14 | addKernel: function() {}, |
| 15 | addFunctions: function() {}, |
| 16 | getPrototypes: function() { return []; }, |
| 17 | addNativeFunctions: function() {} |
| 18 | }, |
| 19 | }); |
| 20 | kernel.build([1]); |
| 21 | assert.equal(kernel.argumentTypes.length, 1); |
| 22 | assert.equal(kernel.argumentTypes[0], 'Array'); |
| 23 | kernel.destroy(); |
| 24 | } |
| 25 | |
| 26 | test('CPUKernel argumentTypes', () => { |
| 27 | argumentTypesTest(CPUKernel); |