Pass system into arm interpreter; fix tests

This commit is contained in:
Weiyi Wang
2018-11-21 17:14:42 -05:00
parent c6b3186475
commit e87dc17da2
12 changed files with 48 additions and 38 deletions

View File

@@ -13,8 +13,8 @@
TEST_CASE("Memory::IsValidVirtualAddress", "[core][memory]") {
// HACK: see comments of member timing
Core::System::GetInstance().timing = std::make_unique<Core::Timing>();
Memory::MemorySystem memory;
Kernel::KernelSystem kernel(memory, 0);
Core::System::GetInstance().memory = std::make_unique<Memory::MemorySystem>();
Kernel::KernelSystem kernel(*Core::System::GetInstance().memory, 0);
SECTION("these regions should not be mapped on an empty process") {
auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0));
CHECK(Memory::IsValidVirtualAddress(*process, Memory::PROCESS_IMAGE_VADDR) == false);