test: fix compilation error of mt tests in clang on Windows
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
e301418423
commit
b9a3adee30
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -62,10 +62,10 @@ TEST(SharingD3DMT, givenD3DSharingWhenSynchroniceObjectIsCalledThenMtxIsLockedBe
|
|||
mockCtx->sharingFunctions[MockD3DSharingFunctions<D3DTypesHelper::D3D11>::sharingId] = std::make_unique<MockD3DSharingFunctions<D3DTypesHelper::D3D11>>();
|
||||
auto mockD3DSharing = std::make_unique<MockD3DSharingBase<D3DTypesHelper::D3D11>>(mockCtx.get());
|
||||
UpdateData updateData(0);
|
||||
std::thread t1(&MockD3DSharingBase<D3DTypesHelper::D3D11>::synchronizeObject, mockD3DSharing.get(), updateData);
|
||||
std::thread t1([&] { mockD3DSharing->synchronizeObject(updateData); });
|
||||
while (!reinterpret_cast<MockD3DSharingFunctions<D3DTypesHelper::D3D11> *>(mockD3DSharing->sharingFunctions)->signalDeviceContextCalled)
|
||||
;
|
||||
std::thread t2(&MockD3DSharingBase<D3DTypesHelper::D3D11>::checkIfMutexWasLocked, mockD3DSharing.get());
|
||||
std::thread t2([&] { mockD3DSharing->checkIfMutexWasLocked(); });
|
||||
t1.join();
|
||||
t2.join();
|
||||
EXPECT_TRUE(mockD3DSharing->isLocked);
|
||||
|
@ -76,10 +76,10 @@ TEST(SharingD3DMT, givenD3DSharingWhenReleaseResourceIsCalledThenMtxIsLockedBefo
|
|||
mockCtx->sharingFunctions[MockD3DSharingFunctions<D3DTypesHelper::D3D11>::sharingId] = std::make_unique<MockD3DSharingFunctions<D3DTypesHelper::D3D11>>();
|
||||
auto mockD3DSharing = std::make_unique<MockD3DSharingBase<D3DTypesHelper::D3D11>>(mockCtx.get());
|
||||
UpdateData updateData(0);
|
||||
std::thread t1(&MockD3DSharingBase<D3DTypesHelper::D3D11>::releaseResource, mockD3DSharing.get(), nullptr, 0);
|
||||
std::thread t1([&] { mockD3DSharing->releaseResource(nullptr, 0); });
|
||||
while (!reinterpret_cast<MockD3DSharingFunctions<D3DTypesHelper::D3D11> *>(mockD3DSharing->sharingFunctions)->signalDeviceContextCalled)
|
||||
;
|
||||
std::thread t2(&MockD3DSharingBase<D3DTypesHelper::D3D11>::checkIfMutexWasLocked, mockD3DSharing.get());
|
||||
std::thread t2([&] { mockD3DSharing->checkIfMutexWasLocked(); });
|
||||
t1.join();
|
||||
t2.join();
|
||||
EXPECT_TRUE(mockD3DSharing->isLocked);
|
||||
|
|
Loading…
Reference in New Issue