Helper: read a range of bytes from memory.
| 133 | |
| 134 | /// Helper: read a range of bytes from memory. |
| 135 | static 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. |
| 146 | class MemCopyOverlapTest : public ::testing::Test { |