Core: Fix tests.
This commit is contained in:
parent
00b09de3d9
commit
9cafb0d912
3 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <chrono>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
#include "core/core.h"
|
||||
|
@ -21,9 +22,11 @@ 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>
|
||||
void HostCallbackTemplate(std::uintptr_t user_data, 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue