MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / TestContext

Method TestContext

test/api/APIAOTCoreTest.cpp:56–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 WasmEdge_ModuleInstanceContext *TestModCxt;
55 WasmEdge_CompilerContext *CompilerCxt;
56 TestContext(const WasmEdge::Configure &C) {
57 WasmEdge_ConfigureContext *ConfCxt = createConf(C);
58 VM = WasmEdge_VMCreate(ConfCxt, nullptr);
59 WasmEdge_ConfigureCompilerSetOptimizationLevel(
60 ConfCxt, WasmEdge_CompilerOptimizationLevel_O0);
61 WasmEdge_ConfigureCompilerSetOutputFormat(
62 ConfCxt, WasmEdge_CompilerOutputFormat_Native);
63 CompilerCxt = WasmEdge_CompilerCreate(ConfCxt);
64 WasmEdge_ConfigureDelete(ConfCxt);
65 TestModCxt = createSpecTestModule();
66 WasmEdge_VMRegisterModuleFromImport(VM, TestModCxt);
67 }
68 ~TestContext() {
69 WasmEdge_VMDelete(VM);
70 WasmEdge_ModuleInstanceDelete(TestModCxt);

Callers

nothing calls this directly

Tested by

no test coverage detected