upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/xgameruntime_test.cpp
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:46 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:46 -0500
commitae59e91bf5e6bdc1b1bbcd2e618140ab56e57d3e (patch)
treeeea67ea8a08c64e2835970a8a3194eee150929ed /runtime/test/xgameruntime_test.cpp
parentd01a491883e347fb6d6ed8deef18bdd98d421cc5 (diff)
parent2428954112549a24fcc2b93206a30620184b044d (diff)
Merge pull request #3295 from Roberto0953
Diffstat (limited to 'runtime/test/xgameruntime_test.cpp')
-rw-r--r--runtime/test/xgameruntime_test.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/test/xgameruntime_test.cpp b/runtime/test/xgameruntime_test.cpp
index c5a0e988e..062840c80 100644
--- a/runtime/test/xgameruntime_test.cpp
+++ b/runtime/test/xgameruntime_test.cpp
@@ -279,6 +279,20 @@ void check_run_time_load() {
279 reinterpret_cast<SetSensitive>(slot(t, 27))(t, false) == S_OK && 279 reinterpret_cast<SetSensitive>(slot(t, 27))(t, false) == S_OK &&
280 !reinterpret_cast<IsSensitive>(slot(t, 30))(t), 280 !reinterpret_cast<IsSensitive>(slot(t, 30))(t),
281 "slots 27 and 30 set and read this thread's time-sensitive flag"); 281 "slots 27 and 30 set and read this thread's time-sensitive flag");
282 // Slot 8 (XAsyncBeginAlloc, private, signature not measured) must not report a begun call whose provider
283 // never received XAsyncOp::Begin: either it refuses, or the provider saw Begin exactly once.
284 static std::atomic<int> s_begins{0};
285 XAsyncProvider* provider = [](XAsyncOp op, const XAsyncProviderData*) -> HRESULT {
286 if (op == XAsyncOp::Begin) s_begins.fetch_add(1);
287 return S_OK;
288 };
289 XAsyncBlock alloc_block{};
290 using BeginAlloc = HRESULT(STDMETHODCALLTYPE*)(void*, XAsyncBlock*, const void*, const char*, XAsyncProvider*,
291 size_t, size_t, void*);
292 const HRESULT alloc_hr =
293 reinterpret_cast<BeginAlloc>(slot(t, 8))(t, &alloc_block, nullptr, "test", provider, 16, 0, nullptr);
294 check(FAILED(alloc_hr) || s_begins.load() == 1,
295 "slot 8 (XAsyncBeginAlloc) never reports success for a call whose provider did not begin");
282 void* unk = nullptr; 296 void* unk = nullptr;
283 const GUID iunknown = {0, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}}; 297 const GUID iunknown = {0, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}};
284 using QI = HRESULT(STDMETHODCALLTYPE*)(void*, REFIID, void**); 298 using QI = HRESULT(STDMETHODCALLTYPE*)(void*, REFIID, void**);