(functype, func)
| 8 | function doNothing() {} |
| 9 | |
| 10 | function assert_function(functype, func) { |
| 11 | var wasmFunc = new WebAssembly.Function(functype, func); |
| 12 | assert_equals(functype.parameters.length, wasmFunc.type().parameters.length); |
| 13 | for(let i = 0; i < functype.parameters.length; i++) { |
| 14 | assert_equals(functype.parameters[i], wasmFunc.type().parameters[i]); |
| 15 | } |
| 16 | assert_equals(functype.results.length, wasmFunc.type().results.length); |
| 17 | for(let i = 0; i < functype.results.length; i++) { |
| 18 | assert_equals(functype.results[i], wasmFunc.type().results[i]); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | test(() => { |
| 23 | assert_function({results: [], parameters: []}, doNothing); |
no test coverage detected