(builder, ffi, handler)
| 20 | } |
| 21 | |
| 22 | function checkSuccessfulInstantiation(builder, ffi, handler) { |
| 23 | // Test synchronous instantiation. |
| 24 | const instance = builder.instantiate(ffi); |
| 25 | if (handler) handler(instance); |
| 26 | |
| 27 | // Test asynchronous instantiation. |
| 28 | assertPromiseResult(builder.asyncInstantiate(ffi), handler); |
| 29 | } |
| 30 | |
| 31 | function checkFailingInstantiation( |
| 32 | builder, ffi, error, message, prepend_context = true) { |
no test coverage detected