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

Method TestContext

test/api/APIStepsCoreTest.cpp:57–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 std::vector<WasmEdge_ModuleInstanceContext *> InstantiatedMod;
56
57 TestContext(const WasmEdge::Configure &C) : ActiveModCxt(nullptr) {
58 WasmEdge_ConfigureContext *ConfCxt = createConf(C);
59 StoreCxt = WasmEdge_StoreCreate();
60 StatCxt = WasmEdge_StatisticsCreate();
61 LoadCxt = WasmEdge_LoaderCreate(ConfCxt);
62 ValidCxt = WasmEdge_ValidatorCreate(ConfCxt);
63 ExecCxt = WasmEdge_ExecutorCreate(ConfCxt, StatCxt);
64 WasmEdge_ConfigureDelete(ConfCxt);
65 TestModCxt = createSpecTestModule();
66 WasmEdge_ExecutorRegisterImport(ExecCxt, StoreCxt, TestModCxt);
67 }
68 ~TestContext() {
69 WasmEdge_LoaderDelete(LoadCxt);
70 WasmEdge_ValidatorDelete(ValidCxt);

Callers

nothing calls this directly

Calls 8

createConfFunction · 0.85
WasmEdge_StoreCreateFunction · 0.85
WasmEdge_LoaderCreateFunction · 0.85
WasmEdge_ValidatorCreateFunction · 0.85
WasmEdge_ExecutorCreateFunction · 0.85
WasmEdge_ConfigureDeleteFunction · 0.85
createSpecTestModuleFunction · 0.85

Tested by

no test coverage detected