summaryrefslogtreecommitdiff
path: root/src/tests/core/memory
diff options
context:
space:
mode:
authorGravatar bunnei2018-03-13 17:49:59 -0400
committerGravatar bunnei2018-03-14 18:42:19 -0400
commit7d6653268f68dea8bc39288e3a27bc499b7b8154 (patch)
tree6330442e1dacc0d850ce09c35dcee7ddd3a2bc9d /src/tests/core/memory
parentMerge pull request #213 from Hexagon12/dynarmic-default (diff)
downloadyuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.gz
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.xz
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.zip
core: Move process creation out of global state.
Diffstat (limited to 'src/tests/core/memory')
-rw-r--r--src/tests/core/memory/memory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/core/memory/memory.cpp b/src/tests/core/memory/memory.cpp
index 0e0a43dcb..165496a54 100644
--- a/src/tests/core/memory/memory.cpp
+++ b/src/tests/core/memory/memory.cpp
@@ -9,7 +9,7 @@
9 9
10TEST_CASE("Memory::IsValidVirtualAddress", "[core][memory][!hide]") { 10TEST_CASE("Memory::IsValidVirtualAddress", "[core][memory][!hide]") {
11 SECTION("these regions should not be mapped on an empty process") { 11 SECTION("these regions should not be mapped on an empty process") {
12 auto process = Kernel::Process::Create("", 0); 12 auto process = Kernel::Process::Create("");
13 CHECK(Memory::IsValidVirtualAddress(*process, Memory::PROCESS_IMAGE_VADDR) == false); 13 CHECK(Memory::IsValidVirtualAddress(*process, Memory::PROCESS_IMAGE_VADDR) == false);
14 CHECK(Memory::IsValidVirtualAddress(*process, Memory::HEAP_VADDR) == false); 14 CHECK(Memory::IsValidVirtualAddress(*process, Memory::HEAP_VADDR) == false);
15 CHECK(Memory::IsValidVirtualAddress(*process, Memory::LINEAR_HEAP_VADDR) == false); 15 CHECK(Memory::IsValidVirtualAddress(*process, Memory::LINEAR_HEAP_VADDR) == false);
@@ -20,14 +20,14 @@ TEST_CASE("Memory::IsValidVirtualAddress", "[core][memory][!hide]") {
20 } 20 }
21 21
22 SECTION("CONFIG_MEMORY_VADDR and SHARED_PAGE_VADDR should be valid after mapping them") { 22 SECTION("CONFIG_MEMORY_VADDR and SHARED_PAGE_VADDR should be valid after mapping them") {
23 auto process = Kernel::Process::Create("", 0); 23 auto process = Kernel::Process::Create("");
24 Kernel::MapSharedPages(process->vm_manager); 24 Kernel::MapSharedPages(process->vm_manager);
25 CHECK(Memory::IsValidVirtualAddress(*process, Memory::CONFIG_MEMORY_VADDR) == true); 25 CHECK(Memory::IsValidVirtualAddress(*process, Memory::CONFIG_MEMORY_VADDR) == true);
26 CHECK(Memory::IsValidVirtualAddress(*process, Memory::SHARED_PAGE_VADDR) == true); 26 CHECK(Memory::IsValidVirtualAddress(*process, Memory::SHARED_PAGE_VADDR) == true);
27 } 27 }
28 28
29 SECTION("special regions should be valid after mapping them") { 29 SECTION("special regions should be valid after mapping them") {
30 auto process = Kernel::Process::Create("", 0); 30 auto process = Kernel::Process::Create("");
31 SECTION("VRAM") { 31 SECTION("VRAM") {
32 Kernel::HandleSpecialMapping(process->vm_manager, 32 Kernel::HandleSpecialMapping(process->vm_manager,
33 {Memory::VRAM_VADDR, Memory::VRAM_SIZE, false, false}); 33 {Memory::VRAM_VADDR, Memory::VRAM_SIZE, false, false});
@@ -48,7 +48,7 @@ TEST_CASE("Memory::IsValidVirtualAddress", "[core][memory][!hide]") {
48 } 48 }
49 49
50 SECTION("Unmapping a VAddr should make it invalid") { 50 SECTION("Unmapping a VAddr should make it invalid") {
51 auto process = Kernel::Process::Create("", 0); 51 auto process = Kernel::Process::Create("");
52 Kernel::MapSharedPages(process->vm_manager); 52 Kernel::MapSharedPages(process->vm_manager);
53 process->vm_manager.UnmapRange(Memory::CONFIG_MEMORY_VADDR, Memory::CONFIG_MEMORY_SIZE); 53 process->vm_manager.UnmapRange(Memory::CONFIG_MEMORY_VADDR, Memory::CONFIG_MEMORY_SIZE);
54 CHECK(Memory::IsValidVirtualAddress(*process, Memory::CONFIG_MEMORY_VADDR) == false); 54 CHECK(Memory::IsValidVirtualAddress(*process, Memory::CONFIG_MEMORY_VADDR) == false);