summaryrefslogtreecommitdiffstats
path: root/src/tests/core/arm
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/core/arm')
-rw-r--r--src/tests/core/arm/arm_test_common.cpp11
-rw-r--r--src/tests/core/arm/arm_test_common.h8
2 files changed, 10 insertions, 9 deletions
diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp
index 9b8a44fa1..3e1a735c3 100644
--- a/src/tests/core/arm/arm_test_common.cpp
+++ b/src/tests/core/arm/arm_test_common.cpp
@@ -4,6 +4,7 @@
#include <algorithm>
+#include "common/page_table.h"
#include "core/core.h"
#include "core/hle/kernel/process.h"
#include "core/memory.h"
@@ -13,16 +14,16 @@
namespace ArmTests {
TestEnvironment::TestEnvironment(bool mutable_memory_)
- : mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
-
- auto process = Kernel::Process::Create(kernel, "");
+ : mutable_memory(mutable_memory_),
+ test_memory(std::make_shared<TestMemory>(this)), kernel{Core::System::GetInstance()} {
+ auto process = Kernel::Process::Create(Core::System::GetInstance(), "");
kernel.MakeCurrentProcess(process.get());
- page_table = &Core::CurrentProcess()->VMManager().page_table;
+ page_table = &process->VMManager().page_table;
std::fill(page_table->pointers.begin(), page_table->pointers.end(), nullptr);
page_table->special_regions.clear();
std::fill(page_table->attributes.begin(), page_table->attributes.end(),
- Memory::PageType::Unmapped);
+ Common::PageType::Unmapped);
Memory::MapIoRegion(*page_table, 0x00000000, 0x80000000, test_memory);
Memory::MapIoRegion(*page_table, 0x80000000, 0x80000000, test_memory);
diff --git a/src/tests/core/arm/arm_test_common.h b/src/tests/core/arm/arm_test_common.h
index 0b7539601..d145dbfcc 100644
--- a/src/tests/core/arm/arm_test_common.h
+++ b/src/tests/core/arm/arm_test_common.h
@@ -9,10 +9,10 @@
#include <vector>
#include "common/common_types.h"
+#include "common/memory_hook.h"
#include "core/hle/kernel/kernel.h"
-#include "core/memory_hook.h"
-namespace Memory {
+namespace Common {
struct PageTable;
}
@@ -58,7 +58,7 @@ public:
private:
friend struct TestMemory;
- struct TestMemory final : Memory::MemoryHook {
+ struct TestMemory final : Common::MemoryHook {
explicit TestMemory(TestEnvironment* env_) : env(env_) {}
TestEnvironment* env;
@@ -86,7 +86,7 @@ private:
bool mutable_memory;
std::shared_ptr<TestMemory> test_memory;
std::vector<WriteRecord> write_records;
- Memory::PageTable* page_table = nullptr;
+ Common::PageTable* page_table = nullptr;
Kernel::KernelCore kernel;
};