Helper function to load wasm file into AST module.
| 385 | |
| 386 | // Helper function to load wasm file into AST module. |
| 387 | WasmEdge_ASTModuleContext *loadModule(const WasmEdge_ConfigureContext *Conf, |
| 388 | const char *Path) { |
| 389 | WasmEdge_ASTModuleContext *Mod = nullptr; |
| 390 | WasmEdge_LoaderContext *Loader = WasmEdge_LoaderCreate(Conf); |
| 391 | WasmEdge_LoaderParseFromFile(Loader, &Mod, Path); |
| 392 | WasmEdge_LoaderDelete(Loader); |
| 393 | return Mod; |
| 394 | } |
| 395 | |
| 396 | // Helper function to validate wasm module. |
| 397 | bool validateModule(const WasmEdge_ConfigureContext *Conf, |
no test coverage detected