diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/tests/common/bit_field.cpp | 5 | ||||
-rw-r--r-- | src/tests/common/param_package.cpp | 5 | ||||
-rw-r--r-- | src/tests/core/core_timing.cpp | 4 | ||||
-rw-r--r-- | src/tests/core/internal_network/network.cpp (renamed from src/tests/core/network/network.cpp) | 4 | ||||
-rw-r--r-- | src/tests/tests.cpp | 5 | ||||
-rw-r--r-- | src/tests/video_core/buffer_base.cpp | 7 |
7 files changed, 17 insertions, 18 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index a69ccb264..43ad2c7ff 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2018 yuzu Emulator Project +# SPDX-License-Identifier: GPL-2.0-or-later + add_executable(tests common/bit_field.cpp common/cityhash.cpp @@ -7,7 +10,7 @@ add_executable(tests common/ring_buffer.cpp common/unique_function.cpp core/core_timing.cpp - core/network/network.cpp + core/internal_network/network.cpp tests.cpp video_core/buffer_base.cpp input_common/calibration_configuration_job.cpp diff --git a/src/tests/common/bit_field.cpp b/src/tests/common/bit_field.cpp index 182638000..0071ae52e 100644 --- a/src/tests/common/bit_field.cpp +++ b/src/tests/common/bit_field.cpp @@ -1,6 +1,5 @@ -// Copyright 2019 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: 2019 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #include <array> #include <cstring> diff --git a/src/tests/common/param_package.cpp b/src/tests/common/param_package.cpp index e31ca3544..d036cc83a 100644 --- a/src/tests/common/param_package.cpp +++ b/src/tests/common/param_package.cpp @@ -1,6 +1,5 @@ -// Copyright 2017 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: 2017 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #include <catch2/catch.hpp> #include <math.h> diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp index 894975e6f..7c432a63c 100644 --- a/src/tests/core/core_timing.cpp +++ b/src/tests/core/core_timing.cpp @@ -8,7 +8,6 @@ #include <chrono> #include <cstdlib> #include <memory> -#include <mutex> #include <optional> #include <string> @@ -23,15 +22,14 @@ std::array<s64, 5> delays{}; std::bitset<CB_IDS.size()> callbacks_ran_flags; u64 expected_callback = 0; -std::mutex control_mutex; template <unsigned int IDX> std::optional<std::chrono::nanoseconds> HostCallbackTemplate(std::uintptr_t user_data, s64 time, std::chrono::nanoseconds ns_late) { - std::unique_lock<std::mutex> lk(control_mutex); static_assert(IDX < CB_IDS.size(), "IDX out of range"); callbacks_ran_flags.set(IDX); REQUIRE(CB_IDS[IDX] == user_data); + REQUIRE(CB_IDS[IDX] == CB_IDS[calls_order[expected_callback]]); delays[IDX] = ns_late.count(); ++expected_callback; return std::nullopt; diff --git a/src/tests/core/network/network.cpp b/src/tests/core/internal_network/network.cpp index 1bbb8372f..164b0ff24 100644 --- a/src/tests/core/network/network.cpp +++ b/src/tests/core/internal_network/network.cpp @@ -3,8 +3,8 @@ #include <catch2/catch.hpp> -#include "core/network/network.h" -#include "core/network/sockets.h" +#include "core/internal_network/network.h" +#include "core/internal_network/sockets.h" TEST_CASE("Network::Errors", "[core]") { Network::NetworkInstance network_instance; // initialize network diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 275b430d9..3f905c05c 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -1,6 +1,5 @@ -// Copyright 2016 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #define CATCH_CONFIG_MAIN #include <catch2/catch.hpp> diff --git a/src/tests/video_core/buffer_base.cpp b/src/tests/video_core/buffer_base.cpp index a1be8dcf1..71121e42a 100644 --- a/src/tests/video_core/buffer_base.cpp +++ b/src/tests/video_core/buffer_base.cpp @@ -22,8 +22,9 @@ constexpr VAddr c = 0x1328914000; class RasterizerInterface { public: void UpdatePagesCachedCount(VAddr addr, u64 size, int delta) { - const u64 page_start{addr >> Core::Memory::PAGE_BITS}; - const u64 page_end{(addr + size + Core::Memory::PAGE_SIZE - 1) >> Core::Memory::PAGE_BITS}; + const u64 page_start{addr >> Core::Memory::YUZU_PAGEBITS}; + const u64 page_end{(addr + size + Core::Memory::YUZU_PAGESIZE - 1) >> + Core::Memory::YUZU_PAGEBITS}; for (u64 page = page_start; page < page_end; ++page) { int& value = page_table[page]; value += delta; @@ -37,7 +38,7 @@ public: } [[nodiscard]] int Count(VAddr addr) const noexcept { - const auto it = page_table.find(addr >> Core::Memory::PAGE_BITS); + const auto it = page_table.find(addr >> Core::Memory::YUZU_PAGEBITS); return it == page_table.end() ? 0 : it->second; } |