(name)
| 279 | |
| 280 | |
| 281 | function testImportName(name) { |
| 282 | var builder = new WasmModuleBuilder(); |
| 283 | builder.addImport("M", name, kSig_i_v); |
| 284 | builder.addFunction("main", kSig_i_v) |
| 285 | .addBody([ |
| 286 | kExprCallFunction, 0 |
| 287 | ]) |
| 288 | .exportFunc(); |
| 289 | |
| 290 | let main = builder.instantiate({M: {[name]: () => 42}}).exports.main; |
| 291 | assertEquals(42, main()); |
| 292 | } |
| 293 | |
| 294 | testImportName('bla'); |
| 295 | testImportName('0'); |
no test coverage detected