summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/CMakeLists.txt1
-rw-r--r--src/tests/common/param_package.cpp2
-rw-r--r--src/tests/core/core_timing.cpp2
-rw-r--r--src/tests/core/memory/memory.cpp56
-rw-r--r--src/tests/glad.cpp2
-rw-r--r--src/tests/tests.cpp2
6 files changed, 4 insertions, 61 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 6a0a62ecc..4d74bb395 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -3,7 +3,6 @@ add_executable(tests
core/arm/arm_test_common.cpp
core/arm/arm_test_common.h
core/core_timing.cpp
- core/memory/memory.cpp
glad.cpp
tests.cpp
)
diff --git a/src/tests/common/param_package.cpp b/src/tests/common/param_package.cpp
index 19d372236..4c0f9654f 100644
--- a/src/tests/common/param_package.cpp
+++ b/src/tests/common/param_package.cpp
@@ -2,7 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include <catch.hpp>
+#include <catch2/catch.hpp>
#include <math.h>
#include "common/param_package.h"
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp
index fcaa30990..2242c14cf 100644
--- a/src/tests/core/core_timing.cpp
+++ b/src/tests/core/core_timing.cpp
@@ -2,7 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
-#include <catch.hpp>
+#include <catch2/catch.hpp>
#include <array>
#include <bitset>
diff --git a/src/tests/core/memory/memory.cpp b/src/tests/core/memory/memory.cpp
deleted file mode 100644
index 165496a54..000000000
--- a/src/tests/core/memory/memory.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2017 Citra Emulator Project
-// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
-
-#include <catch.hpp>
-#include "core/hle/kernel/memory.h"
-#include "core/hle/kernel/process.h"
-#include "core/memory.h"
-
-TEST_CASE("Memory::IsValidVirtualAddress", "[core][memory][!hide]") {
- SECTION("these regions should not be mapped on an empty process") {
- auto process = Kernel::Process::Create("");
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::PROCESS_IMAGE_VADDR) == false);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::HEAP_VADDR) == false);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::LINEAR_HEAP_VADDR) == false);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::VRAM_VADDR) == false);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::CONFIG_MEMORY_VADDR) == false);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::SHARED_PAGE_VADDR) == false);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::TLS_AREA_VADDR) == false);
- }
-
- SECTION("CONFIG_MEMORY_VADDR and SHARED_PAGE_VADDR should be valid after mapping them") {
- auto process = Kernel::Process::Create("");
- Kernel::MapSharedPages(process->vm_manager);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::CONFIG_MEMORY_VADDR) == true);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::SHARED_PAGE_VADDR) == true);
- }
-
- SECTION("special regions should be valid after mapping them") {
- auto process = Kernel::Process::Create("");
- SECTION("VRAM") {
- Kernel::HandleSpecialMapping(process->vm_manager,
- {Memory::VRAM_VADDR, Memory::VRAM_SIZE, false, false});
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::VRAM_VADDR) == true);
- }
-
- SECTION("IO (Not yet implemented)") {
- Kernel::HandleSpecialMapping(
- process->vm_manager, {Memory::IO_AREA_VADDR, Memory::IO_AREA_SIZE, false, false});
- CHECK_FALSE(Memory::IsValidVirtualAddress(*process, Memory::IO_AREA_VADDR) == true);
- }
-
- SECTION("DSP") {
- Kernel::HandleSpecialMapping(
- process->vm_manager, {Memory::DSP_RAM_VADDR, Memory::DSP_RAM_SIZE, false, false});
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::DSP_RAM_VADDR) == true);
- }
- }
-
- SECTION("Unmapping a VAddr should make it invalid") {
- auto process = Kernel::Process::Create("");
- Kernel::MapSharedPages(process->vm_manager);
- process->vm_manager.UnmapRange(Memory::CONFIG_MEMORY_VADDR, Memory::CONFIG_MEMORY_SIZE);
- CHECK(Memory::IsValidVirtualAddress(*process, Memory::CONFIG_MEMORY_VADDR) == false);
- }
-}
diff --git a/src/tests/glad.cpp b/src/tests/glad.cpp
index b0b016440..1797c0e3d 100644
--- a/src/tests/glad.cpp
+++ b/src/tests/glad.cpp
@@ -2,7 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include <catch.hpp>
+#include <catch2/catch.hpp>
#include <glad/glad.h>
// This is not an actual test, but a work-around for issue #2183.
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp
index 73978676f..275b430d9 100644
--- a/src/tests/tests.cpp
+++ b/src/tests/tests.cpp
@@ -3,7 +3,7 @@
// Refer to the license.txt file included.
#define CATCH_CONFIG_MAIN
-#include <catch.hpp>
+#include <catch2/catch.hpp>
// Catch provides the main function since we've given it the
// CATCH_CONFIG_MAIN preprocessor directive.