tests: Introduce assert_that().

This allows us to put a bug_if() or todo_if() in the front of functions
that check other conditions not directly related to the actual test.

assert_that() is similar to ok(). The main difference is that it ignores
bug_if() and todo_if().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2019-03-11 12:19:20 +01:00
committed by Alexandre Julliard
parent b0c8561cff
commit 6c141d7457
4 changed files with 56 additions and 29 deletions

View File

@@ -220,12 +220,12 @@ static void wait_queue_idle_(unsigned int line, ID3D12Device *device, ID3D12Comm
hr = ID3D12Device_CreateFence(device, 0, D3D12_FENCE_FLAG_NONE,
&IID_ID3D12Fence, (void **)&fence);
ok_(line)(hr == S_OK, "Failed to create fence, hr %#x.\n", hr);
assert_that_(line)(hr == S_OK, "Failed to create fence, hr %#x.\n", hr);
hr = ID3D12CommandQueue_Signal(queue, fence, 1);
ok_(line)(hr == S_OK, "Failed to signal fence, hr %#x.\n", hr);
assert_that_(line)(hr == S_OK, "Failed to signal fence, hr %#x.\n", hr);
hr = wait_for_fence(fence, 1);
ok_(line)(hr == S_OK, "Failed to wait for fence, hr %#x.\n", hr);
assert_that_(line)(hr == S_OK, "Failed to wait for fence, hr %#x.\n", hr);
ID3D12Fence_Release(fence);
}