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

Function prefixedVec

test/loader/typeTest.cpp:27–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25WasmEdge::Configure Conf;
26WasmEdge::Loader::Loader Ldr(Conf);
27std::vector<uint8_t> prefixedVec(const std::vector<uint8_t> &Vec) {
28 std::vector<uint8_t> PrefixVec = {
29 0x00U, 0x61U, 0x73U, 0x6DU, // Magic
30 0x01U, 0x00U, 0x00U, 0x00U // Version
31 };
32 PrefixVec.reserve(PrefixVec.size() + Vec.size());
33 PrefixVec.insert(PrefixVec.end(), Vec.begin(), Vec.end());
34 return PrefixVec;
35}
36
37TEST(TypeTest, LoadFunctionType) {
38 std::vector<uint8_t> Vec;

Callers 1

TESTFunction · 0.70

Calls 4

insertMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected