| 28 | } |
| 29 | |
| 30 | WasmEdge_ModuleInstanceContext *createModuleCPP() { |
| 31 | WasmEdge_PluginLoadFromPath( |
| 32 | "./" WASMEDGE_LIB_PREFIX |
| 33 | "wasmedgePluginTestModuleCPP" WASMEDGE_LIB_EXTENSION); |
| 34 | WasmEdge_String Str = |
| 35 | WasmEdge_StringCreateByCString("wasmedge_plugintest_cpp"); |
| 36 | const WasmEdge_PluginContext *PluginCxt = WasmEdge_PluginFind(Str); |
| 37 | WasmEdge_StringDelete(Str); |
| 38 | if (!PluginCxt) { |
| 39 | return nullptr; |
| 40 | } |
| 41 | |
| 42 | Str = WasmEdge_StringCreateByCString("wasmedge_plugintest_cpp_module"); |
| 43 | WasmEdge_ModuleInstanceContext *ModCxt = |
| 44 | WasmEdge_PluginCreateModule(PluginCxt, Str); |
| 45 | WasmEdge_StringDelete(Str); |
| 46 | return ModCxt; |
| 47 | } |
| 48 | } // namespace |
| 49 | |
| 50 | TEST(wasmedgePluginTests, C_Run) { |
no test coverage detected