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

Function readMemory

test/meminstance/MemInstanceTest.cpp:135–143  ·  view source on GitHub ↗

Helper: read a range of bytes from memory.

Source from the content-addressed store, hash-verified

133
134/// Helper: read a range of bytes from memory.
135static std::vector<uint8_t> readMemory(VM::VM &VM, uint32_t Start,
136 uint32_t Len) {
137 std::vector<uint8_t> Result;
138 Result.reserve(Len);
139 for (uint32_t I = 0; I < Len; ++I) {
140 Result.push_back(static_cast<uint8_t>(loadByte(VM, Start + I)));
141 }
142 return Result;
143}
144
145/// Test fixture that creates a fresh VM with the test module for each test.
146class MemCopyOverlapTest : public ::testing::Test {

Callers 1

TEST_FFunction · 0.85

Calls 1

loadByteFunction · 0.85

Tested by

no test coverage detected