summaryrefslogtreecommitdiffstats
path: root/src/tests/core/core_timing.cpp
diff options
context:
space:
mode:
authorMaide <34639600+Kelebek1@users.noreply.github.com>2022-07-28 01:47:06 +0200
committerGitHub <noreply@github.com>2022-07-28 01:47:06 +0200
commit2e461103790110a3deea6425709b1f7f937085ea (patch)
tree495ea29aedfefc3564a87c8c4b44ed199d1aad3a /src/tests/core/core_timing.cpp
parentimplement pause on system suspend (#8585) (diff)
downloadyuzu-2e461103790110a3deea6425709b1f7f937085ea.tar
yuzu-2e461103790110a3deea6425709b1f7f937085ea.tar.gz
yuzu-2e461103790110a3deea6425709b1f7f937085ea.tar.bz2
yuzu-2e461103790110a3deea6425709b1f7f937085ea.tar.lz
yuzu-2e461103790110a3deea6425709b1f7f937085ea.tar.xz
yuzu-2e461103790110a3deea6425709b1f7f937085ea.tar.zst
yuzu-2e461103790110a3deea6425709b1f7f937085ea.zip
Diffstat (limited to '')
-rw-r--r--src/tests/core/core_timing.cpp4
1 files changed, 1 insertions, 3 deletions
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;