Wine-Devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 926 discussions
[PATCH] winegcc: --out-implib needs to propagate -m32/-m64 to winebuild.
by Kevin Puetz Feb. 3, 2022
by Kevin Puetz Feb. 3, 2022
Feb. 3, 2022
This was already passed through for linking, and for spec.o files,
but was overlooked when implementing -Wl,--out-implib
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
---
tools/winegcc/winegcc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 0aafca1271a..aa8c63f5457 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1408,6 +1408,8 @@ static void build(struct options* opts)
strarray_add( &implib_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " )));
tool = build_tool_name( opts, TOOL_LD );
strarray_add( &implib_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " )));
+ if (opts->force_pointer_size)
+ strarray_add(&implib_args, strmake("-m%u", 8 * opts->force_pointer_size ));
strarray_add(&implib_args, "--implib");
strarray_add(&implib_args, "-o");
--
2.34.1
2
2
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/Makefile.in | 1 -
dlls/d2d1/tests/d2d1.c | 1341 +++++++++++++++++------------------
2 files changed, 666 insertions(+), 676 deletions(-)
diff --git a/dlls/d2d1/tests/Makefile.in b/dlls/d2d1/tests/Makefile.in
index cd8701395b2e..5eeb815e07fb 100644
--- a/dlls/d2d1/tests/Makefile.in
+++ b/dlls/d2d1/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d2d1.dll
IMPORTS = d2d1 d3d10_1 d3d11 dwrite dxguid uuid user32 advapi32 ole32 gdi32
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 003aad605054..2ac48e026c32 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -343,12 +343,12 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
HRESULT hr;
hr = IDXGISurface_GetDevice(surface, &IID_ID3D10Device, (void **)&device);
- ok(SUCCEEDED(hr), "Failed to get device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Resource, (void **)&src_resource);
- ok(SUCCEEDED(hr), "Failed to query resource interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_GetDesc(surface, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
texture_desc.Width = surface_desc.Width;
texture_desc.Height = surface_desc.Height;
texture_desc.MipLevels = 1;
@@ -360,7 +360,7 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
texture_desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ;
texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&rb->u.d3d10_resource);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->width = texture_desc.Width;
rb->height = texture_desc.Height;
@@ -370,7 +370,7 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
ID3D10Device_Release(device);
hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->u.d3d10_resource, 0, D3D10_MAP_READ, 0, &map_desc);
- ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->pitch = map_desc.RowPitch;
rb->data = map_desc.pData;
@@ -387,12 +387,12 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
HRESULT hr;
hr = IDXGISurface_GetDevice(surface, &IID_ID3D11Device, (void **)&device);
- ok(SUCCEEDED(hr), "Failed to get device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D11Resource, (void **)&src_resource);
- ok(SUCCEEDED(hr), "Failed to query resource interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_GetDesc(surface, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
texture_desc.Width = surface_desc.Width;
texture_desc.Height = surface_desc.Height;
texture_desc.MipLevels = 1;
@@ -404,7 +404,7 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
texture_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
texture_desc.MiscFlags = 0;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D11Texture2D **)&rb->u.d3d11_resource);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->width = texture_desc.Width;
rb->height = texture_desc.Height;
@@ -415,7 +415,7 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
ID3D11Device_Release(device);
hr = ID3D11DeviceContext_Map(context, rb->u.d3d11_resource, 0, D3D11_MAP_READ, 0, &map_desc);
- ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D11DeviceContext_Release(context);
rb->pitch = map_desc.RowPitch;
@@ -556,7 +556,7 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
hash_size = sizeof(hash_data);
ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &hash_size, 0);
ok(ret, "Failed to get hash value.\n");
- ok(hash_size == sizeof(hash_data), "Got unexpected hash size %u.\n", hash_size);
+ ok(hash_size == sizeof(hash_data), "Got unexpected hash size %lu.\n", hash_size);
ret = CryptDestroyHash(hash);
ok(ret, "Failed to destroy hash.\n");
@@ -594,16 +594,16 @@ static BOOL compare_wic_bitmap(IWICBitmap *bitmap, const char *ref_sha1)
BOOL ret;
hr = IWICBitmap_Lock(bitmap, NULL, WICBitmapLockRead, &lock);
- ok(SUCCEEDED(hr), "Failed to lock bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetDataPointer(lock, &buffer_size, &data);
- ok(SUCCEEDED(hr), "Failed to get bitmap data, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetStride(lock, &stride);
- ok(SUCCEEDED(hr), "Failed to get bitmap stride, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetSize(lock, &width, &height);
- ok(SUCCEEDED(hr), "Failed to get bitmap size, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = compare_sha1(data, stride, 4, width, height, ref_sha1);
@@ -862,7 +862,7 @@ static IDXGIDevice *create_device(BOOL d3d11)
ID3D10Device1_Release(d3d10_device);
}
- ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
return device;
}
@@ -886,9 +886,9 @@ static IDXGISwapChain *create_swapchain(IDXGIDevice *device, HWND window, BOOL w
HRESULT hr;
hr = IDXGIDevice_GetAdapter(device, &adapter);
- ok(SUCCEEDED(hr), "Failed to get adapter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to get factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIAdapter_Release(adapter);
desc.BufferDesc.Width = 640;
@@ -908,7 +908,7 @@ static IDXGISwapChain *create_swapchain(IDXGIDevice *device, HWND window, BOOL w
desc.Flags = 0;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &desc, &swapchain);
- ok(SUCCEEDED(hr), "Failed to create swapchain, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIFactory_Release(factory);
return swapchain;
@@ -921,7 +921,7 @@ static IDXGISwapChain *create_d3d10_swapchain(ID3D10Device1 *device, HWND window
HRESULT hr;
hr = ID3D10Device1_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
swapchain = create_swapchain(dxgi_device, window, windowed);
IDXGIDevice_Release(dxgi_device);
return swapchain;
@@ -935,9 +935,9 @@ static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface,
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, desc, &render_target);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Factory_Release(factory);
return render_target;
@@ -967,7 +967,7 @@ static void release_test_context_(unsigned int line, struct d2d1_test_context *c
ID2D1RenderTarget_GetFactory(ctx->rt, &factory);
ID2D1RenderTarget_Release(ctx->rt);
ref = ID2D1Factory_Release(factory);
- ok_(__FILE__, line)(!ref, "Factory has %u references left.\n", ref);
+ ok_(__FILE__, line)(!ref, "Factory has %lu references left.\n", ref);
IDXGISurface_Release(ctx->surface);
IDXGISwapChain_Release(ctx->swapchain);
@@ -994,7 +994,7 @@ static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx,
ctx->swapchain = create_swapchain(ctx->device, ctx->window, TRUE);
ok_(__FILE__, line)(!!ctx->swapchain, "Failed to create swapchain.\n");
hr = IDXGISwapChain_GetBuffer(ctx->swapchain, 0, &IID_IDXGISurface, (void **)&ctx->surface);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get buffer, hr %#lx.\n", hr);
ctx->rt = create_render_target(ctx->surface, d3d11);
if (!ctx->rt && d3d11)
@@ -1026,7 +1026,7 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
return;
options = ID2D1Bitmap1_GetOptions(bitmap1);
- ok_(__FILE__, line)(options == expected_options, "Unexpected bitmap options %#x, expected %#x.\n",
+ ok_(__FILE__, line)(options == expected_options, "Got unexpected bitmap options %#x, expected %#lx.\n",
options, expected_options);
surface = (void *)0xdeadbeef;
@@ -1038,12 +1038,12 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
D2D1_SIZE_U pixel_size;
DWORD bind_flags = 0;
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get bitmap surface, hr %#lx.\n", hr);
ok_(__FILE__, line)(!!surface, "Expected surface instance.\n");
/* Correlate with resource configuration. */
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Texture2D, (void **)&texture);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get texture pointer, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get texture pointer, hr %#lx.\n", hr);
ID3D10Texture2D_GetDesc(texture, &desc);
ok_(__FILE__, line)(desc.Usage == 0, "Unexpected usage %#x.\n", desc.Usage);
@@ -1072,7 +1072,7 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
}
else
{
- ok_(__FILE__, line)(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok_(__FILE__, line)(!surface, "Unexpected surface instance.\n");
}
@@ -1289,7 +1289,7 @@ static void geometry_sink_check_(unsigned int line, const struct geometry_sink *
"Got unexpected figure %u, segment %u type %#x, expected %#x.\n",
i, j, segment->type, expected_segment->type);
ok_(__FILE__, line)(segment->flags == expected_segment->flags,
- "Got unexpected figure %u, segment %u flags %#x, expected %#x.\n",
+ "Got unexpected figure %u, segment %u flags %#lx, expected %#lx.\n",
i, j, segment->flags, expected_segment->flags);
switch (segment->type)
{
@@ -1480,7 +1480,7 @@ static void test_clip(BOOL d3d11)
ID2D1RenderTarget_PopAxisAlignedClip(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9");
ok(match, "Surface does not match.\n");
@@ -1546,7 +1546,7 @@ static void test_clip(BOOL d3d11)
ID2D1RenderTarget_PopAxisAlignedClip(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
ok(match, "Surface does not match.\n");
@@ -1590,9 +1590,9 @@ static void test_state_block(BOOL d3d11)
rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
- ok(SUCCEEDED(hr), "Failed to create dwrite factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateRenderingParams(dwrite_factory, &text_rendering_params1);
- ok(SUCCEEDED(hr), "Failed to create dwrite rendering params, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDWriteFactory_Release(dwrite_factory);
drawing_state.antialiasMode = ID2D1RenderTarget_GetAntialiasMode(rt);
@@ -1613,7 +1613,7 @@ static void test_state_block(BOOL d3d11)
ok(!text_rendering_params2, "Got unexpected text rendering params %p.\n", text_rendering_params2);
hr = ID2D1Factory_CreateDrawingStateBlock(factory, NULL, NULL, &state_block);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
ok(drawing_state.antialiasMode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
"Got unexpected antialias mode %#x.\n", drawing_state.antialiasMode);
@@ -1635,7 +1635,7 @@ static void test_state_block(BOOL d3d11)
drawing_state.tag2 = 0xbeef;
drawing_state.transform = transform1;
hr = ID2D1Factory_CreateDrawingStateBlock(factory, &drawing_state, text_rendering_params1, &state_block);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
ok(drawing_state.antialiasMode == D2D1_ANTIALIAS_MODE_ALIASED,
@@ -1743,7 +1743,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock1 *state_block1;
hr = ID2D1DrawingStateBlock_QueryInterface(state_block, &IID_ID2D1DrawingStateBlock1, (void **)&state_block1);
- ok(SUCCEEDED(hr), "Failed to get ID2D1DrawingStateBlock1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
ok(drawing_state1.antialiasMode == D2D1_ANTIALIAS_MODE_ALIASED,
@@ -1783,7 +1783,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock1_Release(state_block1);
hr = ID2D1Factory1_CreateDrawingStateBlock(factory1, NULL, NULL, &state_block1);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
ok(drawing_state1.antialiasMode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
"Got unexpected antialias mode %#x.\n", drawing_state1.antialiasMode);
@@ -1808,7 +1808,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock_Release(state_block);
refcount = IDWriteRenderingParams_Release(text_rendering_params1);
- ok(!refcount, "Rendering params %u references left.\n", refcount);
+ ok(!refcount, "Rendering params %lu references left.\n", refcount);
ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -1835,7 +1835,7 @@ static void test_color_brush(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1SolidColorBrush_GetOpacity(brush);
ok(opacity == 1.0f, "Got unexpected opacity %.8e.\n", opacity);
set_matrix_identity(&matrix);
@@ -1856,7 +1856,7 @@ static void test_color_brush(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 2.0f);
brush_desc.transform = matrix;
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, &brush_desc, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1SolidColorBrush_GetOpacity(brush);
ok(opacity == 0.3f, "Got unexpected opacity %.8e.\n", opacity);
ID2D1SolidColorBrush_GetTransform(brush, &tmp_matrix);
@@ -1890,7 +1890,7 @@ static void test_color_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb");
ok(match, "Surface does not match.\n");
@@ -1964,11 +1964,11 @@ static void test_bitmap_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
image_size = ID2D1Bitmap_GetSize(bitmap);
hr = ID2D1Bitmap_QueryInterface(bitmap, &IID_ID2D1Image, (void **)&image);
- ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Vista */, "Failed to get ID2D1Image, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Vista */, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
ID2D1DeviceContext *context;
@@ -1976,7 +1976,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_RECT_F src_rect;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.0f, 0.0f, 1.0f, 1.0f);
@@ -2029,7 +2029,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_COMPOSITE_MODE_SOURCE_OVER);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
@@ -2041,7 +2041,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_COMPOSITE_MODE_SOURCE_OVER);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
@@ -2053,7 +2053,7 @@ static void test_bitmap_brush(BOOL d3d11)
/* Creating a brush with a NULL bitmap crashes on Vista, but works fine on
* Windows 7+. */
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_GetBitmap(brush, &tmp_bitmap);
ok(tmp_bitmap == bitmap, "Got unexpected bitmap %p, expected %p.\n", tmp_bitmap, bitmap);
ID2D1Bitmap_Release(tmp_bitmap);
@@ -2075,7 +2075,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1BitmapBrush_Release(brush);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 40.0f, 120.0f);
scale_matrix(&matrix, 20.0f, 60.0f);
@@ -2130,7 +2130,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
@@ -2148,7 +2148,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_LINEAR + 1, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
@@ -2160,7 +2160,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "59043096393570ad800dbcbfdd644394b79493bd");
ok(match, "Surface does not match.\n");
@@ -2189,7 +2189,7 @@ static void test_bitmap_brush(BOOL d3d11)
}
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "b4b775afecdae2d26642001f4faff73663bb8b31");
ok(match, "Surface does not match.\n");
@@ -2197,7 +2197,7 @@ static void test_bitmap_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f / 20.0f;
bitmap_desc.dpiY = 96.0f / 60.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(brush, bitmap);
ID2D1RenderTarget_BeginDraw(rt);
@@ -2217,14 +2217,14 @@ static void test_bitmap_brush(BOOL d3d11)
set_rect(&dst_rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &dst_rect, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 240.0f, 720.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2238,7 +2238,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
ok(match, "Surface does not match.\n");
@@ -2287,7 +2287,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1BitmapBrush_Release(brush);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(!refcount, "Bitmap has %u references left.\n", refcount);
+ ok(!refcount, "Bitmap has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -2357,12 +2357,12 @@ static void test_linear_brush(BOOL d3d11)
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&gradient_properties.startPoint, 320.0f, 0.0f);
set_point(&gradient_properties.endPoint, 0.0f, 960.0f);
hr = ID2D1RenderTarget_CreateLinearGradientBrush(rt, &gradient_properties, NULL, gradient, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1LinearGradientBrush_GetOpacity(brush);
ok(opacity == 1.0f, "Got unexpected opacity %.8e.\n", opacity);
@@ -2389,7 +2389,7 @@ static void test_linear_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &r, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
@@ -2398,7 +2398,7 @@ static void test_linear_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test1[i].x, test1[i].y);
ok(compare_colour(colour, test1[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test1[i].x, test1[i].y);
}
release_resource_readback(&rb);
@@ -2439,14 +2439,14 @@ static void test_linear_brush(BOOL d3d11)
set_rect(&r, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &r, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 228.5f, 714.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2462,7 +2462,7 @@ static void test_linear_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
@@ -2471,14 +2471,14 @@ static void test_linear_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test2[i].x, test2[i].y);
ok(compare_colour(colour, test2[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test2[i].x, test2[i].y);
}
release_resource_readback(&rb);
ID2D1LinearGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(!refcount, "Gradient has %u references left.\n", refcount);
+ ok(!refcount, "Gradient has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -2548,14 +2548,14 @@ static void test_radial_brush(BOOL d3d11)
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&gradient_properties.center, 160.0f, 480.0f);
set_point(&gradient_properties.gradientOriginOffset, 40.0f, -120.0f);
gradient_properties.radiusX = 160.0f;
gradient_properties.radiusY = 480.0f;
hr = ID2D1RenderTarget_CreateRadialGradientBrush(rt, &gradient_properties, NULL, gradient, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
f = ID2D1RadialGradientBrush_GetOpacity(brush);
ok(f == 1.0f, "Got unexpected opacity %.8e.\n", f);
@@ -2586,7 +2586,7 @@ static void test_radial_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &r, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
@@ -2595,7 +2595,7 @@ static void test_radial_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test1[i].x, test1[i].y);
ok(compare_colour(colour, test1[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test1[i].x, test1[i].y);
}
release_resource_readback(&rb);
@@ -2636,14 +2636,14 @@ static void test_radial_brush(BOOL d3d11)
set_rect(&r, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &r, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 228.5f, 714.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2661,7 +2661,7 @@ static void test_radial_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
@@ -2670,14 +2670,14 @@ static void test_radial_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test2[i].x, test2[i].y);
ok(compare_colour(colour, test2[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test2[i].x, test2[i].y);
}
release_resource_readback(&rb);
ID2D1RadialGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(!refcount, "Gradient has %u references left.\n", refcount);
+ ok(!refcount, "Gradient has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -3161,163 +3161,163 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Close() when closed. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Open() when closed. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Open() when open. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &tmp_sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* BeginFigure() without EndFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* EndFigure() without BeginFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* BeginFigure()/EndFigure() mismatch. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1PathGeometry_Release(geometry);
/* AddLine() outside BeginFigure()/EndFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_AddLine(sink, point);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_AddLine(sink, point);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* Empty figure. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 123.0f, 456.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected segment count %u.\n", count);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 123.0f, 456.0f, 123.0f, 456.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3326,7 +3326,7 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 326.0f, 868.0f, 326.0f, 868.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3335,9 +3335,9 @@ static void test_path_geometry(BOOL d3d11)
/* Degenerate figure. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 123.0f, 456.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
quadratic_to(sink, 123.0f, 456.0f, 123.0f, 456.0f);
@@ -3345,52 +3345,52 @@ static void test_path_geometry(BOOL d3d11)
quadratic_to(sink, 123.0f, 456.0f, 123.0f, 456.0f);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Close right after Open(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Not open yet. */
set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Open, not closed. */
set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 0, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 0, "Got unexpected segment count %u.\n", count);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rect.left > rect.right && rect.top > rect.bottom,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom);
@@ -3399,7 +3399,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 10.0f, 20.0f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rect.left > rect.right && rect.top > rect.bottom,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom);
@@ -3407,17 +3407,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 20.0f, 75.0f, 752.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3427,7 +3427,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 90.0f, 650.0f, 230.0f, 1016.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3436,17 +3436,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments and some hollow components. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 2);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 472.0f, 75.0f, 752.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3456,7 +3456,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 90.0f, 876.0f, 230.0f, 1016.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3465,17 +3465,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments and all hollow components. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 4);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3485,7 +3485,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3493,20 +3493,20 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* The fillmode that's used is the last one set before the sink is closed. */
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
fill_geometry_sink(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Intersections don't create extra segments. */
ok(count == 44, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
@@ -3515,13 +3515,13 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3529,12 +3529,12 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 1.0f, -1.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_init(&simplify_sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[6], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3549,7 +3549,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1Geometry_Simplify(tmp_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&tmp_matrix, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[6], 0);
geometry_sink_cleanup(&simplify_sink);
ID2D1Geometry_Release(tmp_geometry);
@@ -3560,7 +3560,7 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "3aace1b22aae111cb577614fed16e4eb1650dba5");
ok(match, "Surface does not match.\n");
@@ -3568,13 +3568,13 @@ static void test_path_geometry(BOOL d3d11)
set_point(&point, 94.0f, 620.0f);
contains = TRUE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, NULL, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got unexpected contains %#x.\n", contains);
set_point(&point, 95.0f, 620.0f);
contains = FALSE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, NULL, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == TRUE, "Got unexpected contains %#x.\n", contains);
/* With transformation matrix. */
@@ -3583,31 +3583,31 @@ static void test_path_geometry(BOOL d3d11)
set_point(&point, 85.0f, 620.0f);
contains = FALSE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, &matrix, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == TRUE, "Got unexpected contains %#x.\n", contains);
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 44, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 20.0f, 235.0f, 300.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3618,7 +3618,7 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 4.0f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -3.17192993e+02f, 8.71231079e+01f, 4.04055908e+02f, 6.17453125e+02f, 1);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3626,7 +3626,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3634,50 +3634,50 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 320.0f, 320.0f);
scale_matrix(&matrix, -1.0f, 1.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "bfb40a1f007694fa07dbd3b854f3f5d9c3e1d76b");
ok(match, "Surface does not match.\n");
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 20, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[12], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 100.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[20], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 10.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[24], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -3687,12 +3687,12 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 4.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_init(&simplify_sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[16], 4);
geometry_sink_cleanup(&simplify_sink);
@@ -3701,7 +3701,7 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
@@ -3750,37 +3750,37 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 20, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[12], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 100.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[20], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 10.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[24], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -3790,14 +3790,14 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -4.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
@@ -3834,9 +3834,9 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 20.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -3851,12 +3851,12 @@ static void test_path_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 2, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
@@ -3864,40 +3864,40 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "a875e68e0cb9c055927b1b50b879f90b24e38470");
ok(match, "Surface does not match.\n");
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 20.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
line_to(sink, 75.0f, 300.0f);
line_to(sink, 5.0f, 300.0f);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 2, "Got unexpected segment count %u.\n", count);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[28], 1);
geometry_sink_cleanup(&simplify_sink);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -3924,12 +3924,12 @@ static void test_path_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 20.0f, 20.0f, 180.0f, 180.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3937,7 +3937,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[29], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -4010,11 +4010,11 @@ static void test_rectangle_geometry(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 0.0f, 0.0f, 0.0f, 0.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4023,7 +4023,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 50.0f, 0.0f, 40.0f, 100.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 50.0f, 0.0f, 40.0f, 100.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4032,7 +4032,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 0.0f, 100.0f, 40.0f, 50.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 0.0f, 100.0f, 40.0f, 50.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4041,7 +4041,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 50.0f, 100.0f, 40.0f, 50.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 50.0f, 100.0f, 40.0f, 50.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4050,63 +4050,63 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Edge. */
contains = FALSE;
set_point(&point, 0.0f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
/* Within tolerance limit around corner. */
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
contains = FALSE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE + 0.01f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE - 0.01f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE, -D2D1_DEFAULT_FLATTENING_TOLERANCE);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
/* Inside. */
contains = FALSE;
set_point(&point, 5.0f, 5.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
/* Test GetBounds() and Simplify(). */
hr = ID2D1RectangleGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[0], 0);
geometry_sink_cleanup(&sink);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[0], 0);
geometry_sink_cleanup(&sink);
@@ -4115,14 +4115,14 @@ static void test_rectangle_geometry(BOOL d3d11)
scale_matrix(&matrix, 3.0f, 2.0f);
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 2.00000000e+01f, 1.82442951e+01f, 7.95376282e+01f, 6.23606796e+01f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[1], 1);
geometry_sink_cleanup(&sink);
@@ -4130,14 +4130,14 @@ static void test_rectangle_geometry(BOOL d3d11)
translate_matrix(&matrix, 25.0f, 15.0f);
scale_matrix(&matrix, 0.0f, 2.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 25.0f, 15.0f, 25.0f, 55.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[2], 0);
geometry_sink_cleanup(&sink);
@@ -4145,14 +4145,14 @@ static void test_rectangle_geometry(BOOL d3d11)
translate_matrix(&matrix, 30.0f, 45.0f);
scale_matrix(&matrix, 0.5f, 0.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 30.0f, 45.0f, 35.0f, 45.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[3], 0);
geometry_sink_cleanup(&sink);
@@ -4161,23 +4161,23 @@ static void test_rectangle_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 3.0f);
translate_matrix(&matrix, 30.0f, 20.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -7.85640717e+01f, 1.79903809e+02f, 1.07179594e+01f, 2.73205078e+02f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[4], 1);
geometry_sink_cleanup(&sink);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[4], 1);
geometry_sink_cleanup(&sink);
@@ -4185,42 +4185,42 @@ static void test_rectangle_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -3.0f);
scale_matrix(&matrix, 0.25f, 0.2f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 30.0f, 20.0f, 40.0f, 40.0f, 2);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[5], 4);
geometry_sink_cleanup(&sink);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 2.0f, 0.0f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -1.57128143e+02f, 0.00000000e+00f, 2.14359188e+01f, 0.00000000e+00f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[6], 1);
geometry_sink_cleanup(&sink);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.0f, 0.5f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 0.00000000e+00f, 8.99519043e+01f, 0.00000000e+00, 1.36602539e+02f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[7], 1);
geometry_sink_cleanup(&sink);
@@ -4237,11 +4237,11 @@ static void test_rounded_rectangle_geometry(BOOL d3d11)
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rounded_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1Factory_CreateRoundedRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RoundedRectangleGeometry_GetRoundedRect(geometry, &rect2);
ok(!memcmp(&rect, &rect2, sizeof(rect)), "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
@@ -4325,10 +4325,10 @@ static void test_bitmap_formats(BOOL d3d11)
bitmap_desc.pixelFormat.alphaMode = j;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
if (bitmap_formats[i].mask & (1u << j))
- ok(hr == S_OK, "Got unexpected hr %#x, for format %#x/%#x.\n",
+ ok(hr == S_OK, "Got unexpected hr %#lx, for format %#x/%#x.\n",
hr, bitmap_formats[i].format, j);
else
- ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#x, for format %#x/%#x.\n",
+ ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#lx, for format %#x/%#x.\n",
hr, bitmap_formats[i].format, j);
if (SUCCEEDED(hr))
ID2D1Bitmap_Release(bitmap);
@@ -4374,22 +4374,22 @@ static void test_alpha_mode(BOOL d3d11)
bitmap_desc.dpiX = 96.0f / 40.0f;
bitmap_desc.dpiY = 96.0f / 30.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
ID2D1BitmapBrush_SetExtendModeX(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
ID2D1BitmapBrush_SetExtendModeY(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
set_color(&color, 0.0f, 1.0f, 0.0f, 0.75f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create brush, hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "48c41aff3a130a17ee210866b2ab7d36763934d5");
ok(match, "Surface does not match.\n");
@@ -4397,7 +4397,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 1.0f, 0.0f, 0.0f, 0.25f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6487e683730fb5a77c1911388d00b04664c5c4e4");
ok(match, "Surface does not match.\n");
@@ -4405,7 +4405,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 1.0f, 0.75f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "7a35ba09e43cbaf591388ff1ef8de56157630c98");
ok(match, "Surface does not match.\n");
@@ -4423,7 +4423,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
set_rect(&rect, 0.0f, 120.0f, 160.0f, 240.0f);
@@ -4446,7 +4446,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)color_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
ok(match, "Surface does not match.\n");
@@ -4465,12 +4465,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
ID2D1BitmapBrush_Release(bitmap_brush);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
ID2D1BitmapBrush_SetExtendModeX(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
ID2D1BitmapBrush_SetExtendModeY(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
@@ -4478,12 +4478,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1SolidColorBrush_Release(color_brush);
set_color(&color, 0.0f, 1.0f, 0.0f, 0.75f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "b44510bf2d2e61a8d7c0ad862de49a471f1fd13f");
ok(match, "Surface does not match.\n");
@@ -4491,7 +4491,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 1.0f, 0.0f, 0.0f, 0.25f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "2184f4a9198fc1de09ac85301b7a03eebadd9b81");
ok(match, "Surface does not match.\n");
@@ -4499,7 +4499,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 1.0f, 0.75f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6527ec83b4039c895b50f9b3e144fe0cf90d1889");
ok(match, "Surface does not match.\n");
@@ -4517,7 +4517,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
set_rect(&rect, 0.0f, 120.0f, 160.0f, 240.0f);
@@ -4540,12 +4540,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)color_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "465f5a3190d7bde408b3206b4be939fb22f8a3d6");
ok(match, "Surface does not match.\n");
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Bitmap has %u references left.\n", refcount);
+ ok(refcount == 1, "Bitmap has %lu references left.\n", refcount);
ID2D1SolidColorBrush_Release(color_brush);
ID2D1BitmapBrush_Release(bitmap_brush);
ID2D1RenderTarget_Release(rt);
@@ -4579,18 +4579,18 @@ static void test_shared_bitmap(BOOL d3d11)
window2 = create_window();
swapchain2 = create_swapchain(ctx.device, window2, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap1);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -4607,32 +4607,32 @@ static void test_shared_bitmap(BOOL d3d11)
bitmap_desc.dpiY = 96.0f;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory1);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory2);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* DXGI surface render targets with the same device and factory. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, ctx.surface, &desc, &rt1);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmap(rt1, size, NULL, 0, &bitmap_desc, &bitmap1);
check_bitmap_surface(bitmap1, TRUE, 0);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface(bitmap2, TRUE, 0);
ID2D1Bitmap_Release(bitmap2);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IUnknown, bitmap1, NULL, &bitmap2);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with the same device but different factories. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with different devices but the same factory. */
@@ -4642,55 +4642,55 @@ static void test_shared_bitmap(BOOL d3d11)
ok(!!device2, "Failed to create device.\n");
swapchain2 = create_swapchain(device2, window2, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with different devices and different factories. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render target and WIC bitmap render target, same factory. */
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* WIC bitmap render targets on different D2D factories. */
ID2D1Bitmap_Release(bitmap1);
ID2D1RenderTarget_Release(rt1);
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap1, &desc, &rt1);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmap(rt1, size, NULL, 0, &bitmap_desc, &bitmap1);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt1, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == rt1, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
ID2D1GdiInteropRenderTarget_Release(interop);
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory2, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* WIC bitmap render targets on the same D2D factory. */
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface(bitmap2, FALSE, 0);
ID2D1Bitmap_Release(bitmap2);
ID2D1RenderTarget_Release(rt2);
@@ -4705,7 +4705,7 @@ static void test_shared_bitmap(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
@@ -4713,7 +4713,7 @@ static void test_shared_bitmap(BOOL d3d11)
bitmap_desc.dpiY = 0.0f;
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &bitmap2);
- ok(SUCCEEDED(hr) || broken(hr == E_INVALIDARG) /* vista */, "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_INVALIDARG) /* vista */, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
@@ -4745,7 +4745,7 @@ static void test_shared_bitmap(BOOL d3d11)
size = ID2D1Bitmap_GetPixelSize(bitmap2);
hr = IDXGISurface_GetDesc(surface2, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface description, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(size.width == surface_desc.Width && size.height == surface_desc.Height, "Got wrong bitmap size.\n");
check_bitmap_surface(bitmap2, TRUE, D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW);
@@ -4756,7 +4756,7 @@ static void test_shared_bitmap(BOOL d3d11)
if (IDXGISurface_QueryInterface(surface2, &IID_IDXGISurface1, (void **)&surface3) == S_OK)
{
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface1, surface3, &bitmap_desc, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap2);
IDXGISurface1_Release(surface3);
@@ -4768,7 +4768,7 @@ static void test_shared_bitmap(BOOL d3d11)
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &bitmap2);
todo_wine_if(i == 2 || i == 3 || i == 5 || i == 6)
- ok(hr == bitmap_format_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == bitmap_format_tests[i].hr, "%u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(bitmap_format_tests[i].hr))
{
@@ -4836,7 +4836,7 @@ static void test_bitmap_updates(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 320.0f, 240.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
@@ -4846,7 +4846,7 @@ static void test_bitmap_updates(BOOL d3d11)
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 240.0f, 320.0f, 480.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
@@ -4854,31 +4854,31 @@ static void test_bitmap_updates(BOOL d3d11)
set_rect_u(&dst_rect, 1, 1, 3, 3);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, bitmap_data, 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 3, 3, 4);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[6], 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 0, 4, 1);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[10], 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 1, 1, 3);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[2], sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 4, 4, 3, 1);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, bitmap_data, sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 320.0f, 240.0f, 640.0f, 480.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, NULL, bitmap_data, 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 320.0f, 0.0f, 640.0f, 240.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cb8136c91fbbdc76bb83b8c09edc1907b0a5d0a6");
ok(match, "Surface does not match.\n");
@@ -4924,7 +4924,7 @@ static void test_opacity_brush(BOOL d3d11)
set_color(&color, 0.0f, 1.0f, 0.0f, 0.8f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create color brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_size_u(&size, 4, 4);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -4932,12 +4932,12 @@ static void test_opacity_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &opacity_brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(opacity_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
set_size_u(&size, 1, 1);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -4945,12 +4945,12 @@ static void test_opacity_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, &bitmap_data[2], sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5000,7 +5000,7 @@ static void test_opacity_brush(BOOL d3d11)
(ID2D1Brush *)bitmap_brush, (ID2D1Brush *)opacity_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "7141c6c7b3decb91196428efb1856bcbf9872935");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -5042,7 +5042,7 @@ static void test_opacity_brush(BOOL d3d11)
ID2D1RectangleGeometry_Release(geometry);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "c3a5802d1750efa3e9122c1a92f6064df3872732");
ok(match, "Surface does not match.\n");
@@ -5080,7 +5080,7 @@ static void test_create_target(BOOL d3d11)
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(create_dpi_tests); ++i)
{
@@ -5099,21 +5099,21 @@ static void test_create_target(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
- ok(hr == create_dpi_tests[i].hr, "Wrong return code, hr %#x, expected %#x, test %u.\n", hr,
- create_dpi_tests[i].hr, i);
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpect hr %#lx, expected %#lx.\n",
+ i, hr, create_dpi_tests[i].hr);
if (FAILED(hr))
continue;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_IUnknown, (void **)&unk);
- ok(SUCCEEDED(hr), "Failed to get IUnknown, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(unk == (IUnknown *)rt, "Expected same interface pointer.\n");
IUnknown_Release(unk);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5185,10 +5185,10 @@ static void test_draw_text_layout(BOOL d3d11)
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory2);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(factory != factory2, "got same factory\n");
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -5200,33 +5200,33 @@ static void test_draw_text_layout(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, ctx.surface, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextFormat(dwrite_factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"", &text_format);
- ok(SUCCEEDED(hr), "Failed to create text format, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(dwrite_factory, L"text", 4, text_format, 100.0f, 100.0f, &text_layout);
- ok(SUCCEEDED(hr), "Failed to create text layout, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt2, &color, NULL, &brush2);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* effect brush is created from different factory */
range.startPosition = 0;
range.length = 4;
hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (IUnknown*)brush2, range);
- ok(SUCCEEDED(hr), "Failed to set drawing effect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5234,17 +5234,17 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush*)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- todo_wine ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
/* Effect is d2d resource, but not a brush. */
set_rect(&rect, 0.0f, 0.0f, 10.0f, 10.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
range.startPosition = 0;
range.length = 4;
hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (IUnknown*)geometry, range);
- ok(SUCCEEDED(hr), "Failed to set drawing effect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(geometry);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5253,7 +5253,7 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush*)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(antialias_mode_tests); ++i)
{
@@ -5263,7 +5263,7 @@ static void test_draw_text_layout(BOOL d3d11)
hr = IDWriteFactory_CreateCustomRenderingParams(dwrite_factory, 2.0f, 1.0f, 0.0f, DWRITE_PIXEL_GEOMETRY_FLAT,
antialias_mode_tests[i].rendering_mode, &rendering_params);
- ok(SUCCEEDED(hr), "Failed to create custom rendering params, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ID2D1RenderTarget_SetTextRenderingParams(rt, rendering_params);
@@ -5272,7 +5272,7 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush *)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == antialias_mode_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == antialias_mode_tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr);
IDWriteRenderingParams_Release(rendering_params);
}
@@ -5343,7 +5343,7 @@ static void test_dc_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(invalid_formats); ++i)
{
@@ -5355,7 +5355,7 @@ static void test_dc_target(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#lx.\n", hr);
}
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -5366,16 +5366,16 @@ static void test_dc_target(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DCRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1DCRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1DCRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5391,18 +5391,18 @@ static void test_dc_target(BOOL d3d11)
/* object creation methods work without BindDC() */
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1DCRenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1SolidColorBrush_Release(brush);
ID2D1DCRenderTarget_BeginDraw(rt);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_Release(rt);
/* BindDC() */
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
aa_mode = ID2D1DCRenderTarget_GetAntialiasMode(rt);
ok(aa_mode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, "Got wrong default aa mode %d.\n", aa_mode);
@@ -5419,7 +5419,7 @@ static void test_dc_target(BOOL d3d11)
SetRect(&rect, 0, 0, 32, 32);
hr = ID2D1DCRenderTarget_BindDC(rt, NULL, &rect);
- ok(hr == E_INVALIDARG, "BindDC() returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Target properties are retained during BindDC() */
ID2D1DCRenderTarget_SetTags(rt, 1, 2);
@@ -5431,7 +5431,7 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_SetTransform(rt, &matrix);
hr = ID2D1DCRenderTarget_BindDC(rt, hdc, &rect);
- ok(hr == S_OK, "BindDC() returned %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_GetTags(rt, &t1, &t2);
ok(t1 == 1 && t2 == 2, "Got wrong tags.\n");
@@ -5460,10 +5460,10 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc, 0, 0);
- ok(clr == RGB(255, 0, 0), "Unexpected color 0x%08x.\n", clr);
+ ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08lx.\n", clr);
hdc2 = CreateCompatibleDC(NULL);
ok(hdc2 != NULL, "Failed to create an HDC.\n");
@@ -5471,14 +5471,14 @@ static void test_dc_target(BOOL d3d11)
create_target_dibsection(hdc2, 16, 16);
hr = ID2D1DCRenderTarget_BindDC(rt, hdc2, &rect);
- ok(hr == S_OK, "BindDC() returned %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- ok(clr == 0, "Unexpected color 0x%08x.\n", clr);
+ ok(clr == 0, "Got unexpected colour 0x%08lx.\n", clr);
set_color(&color, 0.0f, 1.0f, 0.0f, 1.0f);
hr = ID2D1DCRenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5488,19 +5488,19 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_FillRectangle(rt, &r, (ID2D1Brush*)brush);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1SolidColorBrush_Release(brush);
clr = GetPixel(hdc2, 0, 0);
- ok(clr == RGB(0, 255, 0), "Unexpected color 0x%08x.\n", clr);
+ ok(clr == RGB(0, 255, 0), "Got unexpected colour 0x%08lx.\n", clr);
clr = GetPixel(hdc2, 10, 0);
- ok(clr == 0, "Unexpected color 0x%08x.\n", clr);
+ ok(clr == 0, "Got unexpected colour 0x%08lx.\n", clr);
/* Invalid DC. */
hr = ID2D1DCRenderTarget_BindDC(rt, (HDC)0xdeadbeef, &rect);
- todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5508,13 +5508,13 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- todo_wine ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08x.\n", clr);
+ todo_wine ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08lx.\n", clr);
hr = ID2D1DCRenderTarget_BindDC(rt, NULL, &rect);
- ok(hr == E_INVALIDARG, "BindDC() returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5522,10 +5522,10 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- todo_wine ok(clr == RGB(0, 0, 255), "Got unexpected colour 0x%08x.\n", clr);
+ todo_wine ok(clr == RGB(0, 0, 255), "Got unexpected colour 0x%08lx.\n", clr);
DeleteDC(hdc);
DeleteDC(hdc2);
@@ -5550,7 +5550,7 @@ static void test_hwnd_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -5566,25 +5566,25 @@ static void test_hwnd_target(BOOL d3d11)
hwnd_rt_desc.presentOptions = D2D1_PRESENT_OPTIONS_NONE;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(FAILED(hr), "Target creation should fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
hwnd_rt_desc.hwnd = (HWND)0xdeadbeef;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(FAILED(hr), "Target creation should fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
hwnd_rt_desc.hwnd = CreateWindowA("static", "d2d_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1HwndRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1HwndRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1HwndRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5592,7 +5592,7 @@ static void test_hwnd_target(BOOL d3d11)
size.width = 128;
size.height = 64;
hr = ID2D1HwndRenderTarget_Resize(rt, &size);
- ok(SUCCEEDED(hr), "Failed to resize render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1HwndRenderTarget_Release(rt);
@@ -5634,7 +5634,7 @@ static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *r
{
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, size_tests[i].size, size_tests[i].pixel_size,
NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &bitmap_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "%u: Failed to create render target, hr %#x.\n", i, hr);
+ ok_(__FILE__, line)(SUCCEEDED(hr), "%u: Failed to create render target, hr %#lx.\n", i, hr);
if (size_tests[i].pixel_size)
{
@@ -5671,7 +5671,7 @@ static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *r
pixel_size.height = pixel_size.width = 0;
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &bitmap_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create render target, hr %#lx.\n", hr);
if (SUCCEEDED(ID2D1BitmapRenderTarget_QueryInterface(bitmap_rt, &IID_ID2D1DeviceContext, (void **)&context)))
{
@@ -5717,7 +5717,7 @@ static void test_bitmap_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -5734,22 +5734,22 @@ static void test_bitmap_target(BOOL d3d11)
hwnd_rt_desc.presentOptions = D2D1_PRESENT_OPTIONS_NONE;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &hwnd_rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
test_compatible_target_size((ID2D1RenderTarget *)hwnd_rt);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1BitmapRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1BitmapRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5757,7 +5757,7 @@ static void test_bitmap_target(BOOL d3d11)
/* See if parent target is referenced. */
ID2D1HwndRenderTarget_AddRef(hwnd_rt);
refcount = ID2D1HwndRenderTarget_Release(hwnd_rt);
- ok(refcount == 1, "Target should not have been referenced, got %u.\n", refcount);
+ ok(refcount == 1, "Target should not have been referenced, got %lu.\n", refcount);
/* Size was not specified, should match parent. */
pixel_size = ID2D1HwndRenderTarget_GetPixelSize(hwnd_rt);
@@ -5778,7 +5778,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_u(&pixel_size, 32, 32);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, NULL, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size2 = ID2D1BitmapRenderTarget_GetPixelSize(rt);
ok(!memcmp(&pixel_size, &pixel_size2, sizeof(pixel_size)), "Got target pixel size mismatch.\n");
@@ -5792,7 +5792,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_u(&pixel_size, 128, 128);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &size, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Doubled pixel size dimensions with the same DIP size give doubled dpi. */
ID2D1BitmapRenderTarget_GetDpi(rt, dpi2, dpi2 + 1);
@@ -5804,7 +5804,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_f(&size, 70.1f, 70.4f);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &size, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapRenderTarget_GetDpi(rt, dpi2, dpi2 + 1);
@@ -5822,9 +5822,9 @@ static void test_bitmap_target(BOOL d3d11)
/* Check if GetBitmap() returns same instance. */
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap2);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(bitmap == bitmap2, "Got different bitmap instances.\n");
/* Draw something, see if bitmap instance is retained. */
@@ -5832,18 +5832,18 @@ static void test_bitmap_target(BOOL d3d11)
set_color(&color, 1.0f, 1.0f, 0.0f, 1.0f);
ID2D1BitmapRenderTarget_Clear(rt, &color);
hr = ID2D1BitmapRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap2);
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap2);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(bitmap == bitmap2, "Got different bitmap instances.\n");
ID2D1Bitmap_Release(bitmap);
ID2D1Bitmap_Release(bitmap2);
refcount = ID2D1BitmapRenderTarget_Release(rt);
- ok(!refcount, "Target should be released, got %u.\n", refcount);
+ ok(!refcount, "Target should be released, got %lu.\n", refcount);
DestroyWindow(hwnd_rt_desc.hwnd);
@@ -5856,19 +5856,19 @@ static void test_bitmap_target(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &dc_rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
test_compatible_target_size((ID2D1RenderTarget *)dc_rt);
hr = ID2D1DCRenderTarget_CreateCompatibleRenderTarget(dc_rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size = ID2D1BitmapRenderTarget_GetPixelSize(rt);
ok(pixel_size.width == 0 && pixel_size.height == 0, "Got wrong size\n");
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size = ID2D1Bitmap_GetPixelSize(bitmap);
ok(pixel_size.width == 0 && pixel_size.height == 0, "Got wrong size\n");
ID2D1Bitmap_Release(bitmap);
@@ -5886,7 +5886,7 @@ static void test_desktop_dpi(BOOL d3d11)
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
dpi_x = dpi_y = 0.0f;
ID2D1Factory_GetDesktopDpi(factory, &dpi_x, &dpi_y);
@@ -5924,7 +5924,7 @@ static void test_stroke_style(BOOL d3d11)
float dashes[2];
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.startCap = D2D1_CAP_STYLE_SQUARE;
desc.endCap = D2D1_CAP_STYLE_ROUND;
@@ -5935,7 +5935,7 @@ static void test_stroke_style(BOOL d3d11)
desc.dashOffset = -1.0f;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
cap_style = ID2D1StrokeStyle_GetStartCap(style);
ok(cap_style == D2D1_CAP_STYLE_SQUARE, "Unexpected cap style %d.\n", cap_style);
@@ -5964,24 +5964,24 @@ static void test_stroke_style(BOOL d3d11)
ID2D1StrokeStyle_Release(style);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 1, &style);
- ok(hr == S_OK, "Unexpected return value, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1StrokeStyle_Release(style);
/* Builtin style, dashes are specified. */
desc.dashStyle = D2D1_DASH_STYLE_DOT;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 1, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Invalid style. */
desc.dashStyle = 100;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Test returned dash pattern for builtin styles. */
desc.startCap = D2D1_CAP_STYLE_SQUARE;
@@ -5999,7 +5999,7 @@ static void test_stroke_style(BOOL d3d11)
desc.dashStyle = dash_style_tests[i].dash_style;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
dash_count = ID2D1StrokeStyle_GetDashesCount(style);
ok(dash_count == dash_style_tests[i].dash_count, "%u: unexpected dash count %u, expected %u.\n",
@@ -6029,7 +6029,7 @@ static void test_stroke_style(BOOL d3d11)
/* NULL dashes array, non-zero length. */
memset(&desc, 0, sizeof(desc));
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 1, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
count = ID2D1StrokeStyle_GetDashesCount(style);
ok(count == 0, "Unexpected dashes count %u.\n", count);
@@ -6059,7 +6059,7 @@ static void test_gradient(BOOL d3d11)
stops2[1] = stops2[0];
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops2, 2, D2D1_GAMMA_2_2,
D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
count = ID2D1GradientStopCollection_GetGradientStopCount(gradient);
ok(count == 2, "Unexpected stop count %u.\n", count);
@@ -6112,7 +6112,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.396f, 0.180f, 0.537f, 1.0f);
@@ -6149,7 +6149,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawEllipse(rt, &ellipse, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
@@ -6242,7 +6242,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
@@ -6336,7 +6336,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
@@ -6399,9 +6399,9 @@ static void test_draw_geometry(BOOL d3d11)
todo_wine ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 160.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -6471,14 +6471,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 5.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
@@ -6550,11 +6550,11 @@ static void test_draw_geometry(BOOL d3d11)
set_rect(&rect, 20.0f, 80.0f, 60.0f, 240.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -6562,14 +6562,14 @@ static void test_draw_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)rect_geometry[1], &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.5f, 1.0f);
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[0], &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -6577,7 +6577,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -6586,7 +6586,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[1], (ID2D1Brush *)brush, 5.0f, NULL);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, 15.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
@@ -6653,9 +6653,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -6754,14 +6754,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
@@ -6876,9 +6876,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -6897,7 +6897,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -6905,7 +6905,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -6913,7 +6913,7 @@ static void test_draw_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -6921,7 +6921,7 @@ static void test_draw_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -6929,7 +6929,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -6938,7 +6938,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, 5.0f, NULL);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, 15.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -6990,9 +6990,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -7005,14 +7005,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 32,
@@ -7062,7 +7062,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.396f, 0.180f, 0.537f, 1.0f);
@@ -7087,7 +7087,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillEllipse(rt, &ellipse, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7145,7 +7145,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7215,7 +7215,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7254,9 +7254,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 160.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7326,14 +7326,14 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
@@ -7381,11 +7381,11 @@ static void test_fill_geometry(BOOL d3d11)
set_rect(&rect, 20.0f, 80.0f, 60.0f, 240.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7393,14 +7393,14 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)rect_geometry[1], &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.5f, 1.0f);
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[0], &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7408,7 +7408,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7417,7 +7417,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[1], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
@@ -7463,9 +7463,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7564,14 +7564,14 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
@@ -7645,9 +7645,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7666,7 +7666,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -7674,7 +7674,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7682,7 +7682,7 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -7690,7 +7690,7 @@ static void test_fill_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7698,7 +7698,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7707,7 +7707,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -7749,9 +7749,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -7770,7 +7770,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -7778,7 +7778,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7786,7 +7786,7 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -7794,7 +7794,7 @@ static void test_fill_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7802,7 +7802,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7811,7 +7811,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -7851,15 +7851,15 @@ static void test_gdi_interop(BOOL d3d11)
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
/* WIC target, default usage */
@@ -7872,19 +7872,19 @@ static void test_gdi_interop(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory, wic_bitmap, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get gdi interop interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
dc = (void *)0xdeadbeef;
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(FAILED(hr), "GetDC() was expected to fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!dc, "Got unexpected DC %p.\n", dc);
ID2D1GdiInteropRenderTarget_Release(interop);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt);
@@ -7892,25 +7892,25 @@ static void test_gdi_interop(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory, wic_bitmap, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get gdi interop interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
dc = NULL;
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(SUCCEEDED(hr), "GetDC() was expected to succeed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(dc != NULL, "Expected NULL dc, got %p.\n", dc);
ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 1.0f, 0.0f, 0.0f, 1.0f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_wic_bitmap(wic_bitmap, "54034063dbc1c1bb61cb60ec57e4498678dc2b13");
ok(match, "Bitmap does not match.\n");
@@ -7919,37 +7919,37 @@ static void test_gdi_interop(BOOL d3d11)
ID2D1RenderTarget_BeginDraw(rt);
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(SUCCEEDED(hr), "GetDC() was expected to succeed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 0, 0, 16, 16);
FillRect(dc, &rect, GetStockObject(BLACK_BRUSH));
ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_wic_bitmap(wic_bitmap, "60cacbf3d72e1e7834203da608037b1bf83b40e8");
ok(match, "Bitmap does not match.\n");
/* Bitmap is locked at BeginDraw(). */
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- ok(SUCCEEDED(hr), "Expected bitmap to be unlocked, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICBitmapLock_Release(wic_lock);
ID2D1RenderTarget_BeginDraw(rt);
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
IWICBitmapLock_Release(wic_lock);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Lock before BeginDraw(). */
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- ok(SUCCEEDED(hr), "Expected bitmap to be unlocked, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#lx.\n", hr);
IWICBitmapLock_Release(wic_lock);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -7979,7 +7979,7 @@ static void test_layer(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
hr = ID2D1RenderTarget_CreateLayer(rt, NULL, &layer);
- ok(SUCCEEDED(hr), "Failed to create layer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Layer_GetFactory(layer, &layer_factory);
ok(layer_factory == factory, "Got unexpected layer factory %p, expected %p.\n", layer_factory, factory);
ID2D1Factory_Release(layer_factory);
@@ -7990,7 +7990,7 @@ static void test_layer(BOOL d3d11)
set_size_f(&size, 800.0f, 600.0f);
hr = ID2D1RenderTarget_CreateLayer(rt, &size, &layer);
- ok(SUCCEEDED(hr), "Failed to create layer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
size = ID2D1Layer_GetSize(layer);
ok(size.width == 800.0f, "Got unexpected width %.8e.\n", size.width);
ok(size.height == 600.0f, "Got unexpected height %.8e.\n", size.height);
@@ -8023,12 +8023,12 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 160.0f, 720.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -8049,7 +8049,7 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
@@ -8057,7 +8057,7 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
@@ -8087,9 +8087,9 @@ static void test_bezier_intersect(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 240.0f, 720.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -8100,14 +8100,14 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
@@ -8155,7 +8155,7 @@ static void test_create_device(BOOL d3d11)
}
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_GetFactory(device, &factory2);
ok(factory2 == (ID2D1Factory *)factory, "Got unexpected factory %p, expected %p.\n", factory2, factory);
@@ -8165,11 +8165,11 @@ static void test_create_device(BOOL d3d11)
if (pD2D1CreateDevice)
{
hr = pD2D1CreateDevice(ctx.device, NULL, &device);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
hr = pD2D1CreateDevice(ctx.device, &properties, &device);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
}
else
@@ -8178,7 +8178,7 @@ static void test_create_device(BOOL d3d11)
release_test_context(&ctx);
refcount = ID2D1Factory1_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ok(!refcount, "Factory has %lu references left.\n", refcount);
}
#define check_rt_bitmap_surface(r, s, o) check_rt_bitmap_surface_(__LINE__, r, s, o)
@@ -8207,7 +8207,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
@@ -8216,19 +8216,19 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
/* Zero sized bitmaps. */
set_size_u(&size, 0, 0);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
set_size_u(&size, 2, 0);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
set_size_u(&size, 0, 2);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
@@ -8237,15 +8237,15 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create WIC imaging factory, hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create WIC bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create WIC bitmap, hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
hr = ID2D1RenderTarget_CreateBitmapFromWicBitmap(rt, (IWICBitmapSource *)wic_bitmap, NULL, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap from WIC source, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap from WIC source, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
@@ -8255,7 +8255,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
/* Compatible target follows its parent. */
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get device context, hr %#lx.\n", hr);
dc_rt = NULL;
ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DCRenderTarget, (void **)&dc_rt);
@@ -8289,10 +8289,10 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &compatible_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create compatible render target, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create compatible render target, hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_QueryInterface(compatible_rt, &IID_ID2D1DeviceContext, (void **)&context2);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get device context, hr %#lx.\n", hr);
ID2D1DeviceContext_GetDevice(context2, &device2);
ok_(__FILE__, line)(device == device2, "Unexpected device.\n");
@@ -8302,12 +8302,12 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = ID2D1BitmapRenderTarget_CreateBitmap(compatible_rt, size,
bitmap_data, sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
hr = ID2D1BitmapRenderTarget_GetBitmap(compatible_rt, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get compatible target bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get compatible target bitmap, hr %#lx.\n", hr);
bitmap2 = NULL;
ID2D1DeviceContext_GetTarget(context2, (ID2D1Image **)&bitmap2);
@@ -8324,7 +8324,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
{
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &compatible_rt);
- ok_(__FILE__, line)(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT, "Unexpected hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT, "Unexpected hr %#lx.\n", hr);
}
ID2D1DeviceContext_Release(context);
@@ -8355,13 +8355,13 @@ static IDXGISurface *create_surface(IDXGIDevice *dxgi_device, DXGI_FORMAT format
texture_desc.MiscFlags = 0;
hr = IDXGIDevice_QueryInterface(dxgi_device, &IID_ID3D10Device, (void **)&d3d_device);
- ok(SUCCEEDED(hr), "Failed to get device interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device_CreateTexture2D(d3d_device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create a texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get surface interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10Device_Release(d3d_device);
ID3D10Texture2D_Release(texture);
@@ -8428,7 +8428,7 @@ static void test_bitmap_surface(BOOL d3d11)
/* DXGI target */
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
bitmap = NULL;
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
@@ -8442,10 +8442,10 @@ static void test_bitmap_surface(BOOL d3d11)
/* Bitmap created from DXGI surface. */
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(bitmap_format_tests); ++i)
{
@@ -8455,7 +8455,7 @@ static void test_bitmap_surface(BOOL d3d11)
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
todo_wine_if(bitmap_format_tests[i].hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT)
- ok(hr == bitmap_format_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == bitmap_format_tests[i].hr, "%u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(bitmap_format_tests[i].hr))
{
@@ -8474,8 +8474,8 @@ static void test_bitmap_surface(BOOL d3d11)
surface2 = create_surface(ctx.device, DXGI_FORMAT_A8_UNORM);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface2, NULL, &bitmap);
- ok(SUCCEEDED(hr) || broken(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) /* Win7 */,
- "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) /* Win7 */,
+ "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
@@ -8489,7 +8489,7 @@ static void test_bitmap_surface(BOOL d3d11)
IDXGISurface_Release(surface2);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, NULL, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_format = ID2D1Bitmap1_GetPixelFormat(bitmap);
ok(pixel_format.alphaMode == D2D1_ALPHA_MODE_PREMULTIPLIED,
@@ -8511,14 +8511,14 @@ static void test_bitmap_surface(BOOL d3d11)
bitmap_desc.pixelFormat = ID2D1DeviceContext_GetPixelFormat(device_context);
size.width = size.height = 4;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface((ID2D1Bitmap *)bitmap, TRUE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1DeviceContext_SetTags(device_context, 1, 2);
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
- ok(hr == D2DERR_INVALID_TARGET, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_TARGET, "Got unexpected hr %#lx.\n", hr);
ok(t1 == 1 && t2 == 2, "Unexpected tags %s:%s.\n", wine_dbgstr_longlong(t1), wine_dbgstr_longlong(t2));
ID2D1Bitmap1_Release(bitmap);
@@ -8529,7 +8529,7 @@ static void test_bitmap_surface(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface((ID2D1Bitmap *)bitmap, TRUE, D2D1_BITMAP_OPTIONS_TARGET);
ID2D1DeviceContext_SetTarget(device_context, NULL);
ID2D1DeviceContext_SetTags(device_context, 3, 4);
@@ -8537,7 +8537,7 @@ static void test_bitmap_surface(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!t1 && !t2, "Unexpected tags %s:%s.\n", wine_dbgstr_longlong(t1), wine_dbgstr_longlong(t2));
ID2D1Bitmap1_Release(bitmap);
@@ -8555,10 +8555,10 @@ static void test_bitmap_surface(BOOL d3d11)
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory1_CreateDCRenderTarget(factory, &rt_desc, (ID2D1DCRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
ok(!bitmap, "Unexpected target.\n");
@@ -8575,7 +8575,7 @@ static void test_bitmap_surface(BOOL d3d11)
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory1_CreateHwndRenderTarget(factory, &rt_desc, &hwnd_rt_desc, (ID2D1HwndRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_rt_bitmap_surface(rt, FALSE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1RenderTarget_Release(rt);
@@ -8586,14 +8586,14 @@ static void test_bitmap_surface(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
hr = ID2D1Factory1_CreateWicBitmapRenderTarget(factory, wic_bitmap, &rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_rt_bitmap_surface(rt, FALSE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1RenderTarget_Release(rt);
@@ -8637,10 +8637,10 @@ static void test_device_context(BOOL d3d11)
}
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetDevice(device_context, &device2);
ok(device2 == device, "Unexpected device instance.\n");
@@ -8658,19 +8658,19 @@ static void test_device_context(BOOL d3d11)
/* DXGI target */
rt = ctx.rt;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
- ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_BeginDraw(device_context);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
- ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
@@ -8687,10 +8687,10 @@ static void test_device_context(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
rt_desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -8701,16 +8701,16 @@ static void test_device_context(BOOL d3d11)
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory1_CreateWicBitmapRenderTarget(factory, wic_bitmap, &rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8731,16 +8731,16 @@ static void test_device_context(BOOL d3d11)
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory1_CreateHwndRenderTarget(factory, &rt_desc, &hwnd_rt_desc, (ID2D1HwndRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- ok(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8753,10 +8753,10 @@ static void test_device_context(BOOL d3d11)
/* DC target */
hr = ID2D1Factory1_CreateDCRenderTarget(factory, &rt_desc, &dc_rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DCRenderTarget_QueryInterface(dc_rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
ok(bitmap == NULL, "Unexpected bitmap instance.\n");
@@ -8767,14 +8767,14 @@ static void test_device_context(BOOL d3d11)
SetRect(&rect, 0, 0, 16, 16);
hr = ID2D1DCRenderTarget_BindDC(dc_rt, hdc, &rect);
- ok(SUCCEEDED(hr), "BindDC() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW | D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- ok(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8918,10 +8918,10 @@ static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, IDXGIDe
HRESULT hr;
hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
return device_context;
@@ -8975,7 +8975,7 @@ static void test_command_list(BOOL d3d11)
ok(device_context != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr))
{
@@ -8988,7 +8988,7 @@ static void test_command_list(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
hr = ID2D1DeviceContext_QueryInterface(device_context, &IID_ID2D1RenderTarget, (void **)&rt);
- ok(SUCCEEDED(hr), "Failed to get rt interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Test how resources are referenced by the list. */
@@ -8999,70 +8999,70 @@ static void test_command_list(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, NULL, 0.25f, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Solid color brush. */
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 16.0f, 16.0f);
ID2D1RenderTarget_FillRectangle(rt, &rect, brush);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
/* Bitmap brush. */
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, (ID2D1BitmapBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 16.0f, 16.0f);
ID2D1RenderTarget_FillRectangle(rt, &rect, brush);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Linear gradient brush. */
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&linear_gradient_properties.startPoint, 320.0f, 0.0f);
set_point(&linear_gradient_properties.endPoint, 0.0f, 960.0f);
hr = ID2D1RenderTarget_CreateLinearGradientBrush(rt, &linear_gradient_properties, NULL, gradient,
(ID2D1LinearGradientBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Radial gradient brush. */
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&radial_gradient_properties.center, 160.0f, 480.0f);
set_point(&radial_gradient_properties.gradientOriginOffset, 40.0f, -120.0f);
@@ -9070,39 +9070,39 @@ static void test_command_list(BOOL d3d11)
radial_gradient_properties.radiusY = 480.0f;
hr = ID2D1RenderTarget_CreateRadialGradientBrush(rt, &radial_gradient_properties, NULL, gradient,
(ID2D1RadialGradientBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Geometry. */
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Stroke style. */
stroke_desc.startCap = D2D1_CAP_STYLE_SQUARE;
@@ -9114,21 +9114,21 @@ static void test_command_list(BOOL d3d11)
stroke_desc.dashOffset = -1.0f;
hr = ID2D1Factory_CreateStrokeStyle((ID2D1Factory *)factory, &stroke_desc, NULL, 0, &stroke_style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&p0, 100.0f, 160.0f);
set_point(&p1, 140.0f, 160.0f);
ID2D1RenderTarget_DrawLine(rt, p0, p1, brush, 1.0f, stroke_style);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1StrokeStyle_Release(stroke_style);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Close on attached list. */
ID2D1DeviceContext_GetTarget(device_context, &target);
@@ -9136,22 +9136,22 @@ static void test_command_list(BOOL d3d11)
ID2D1Image_Release(target);
hr = ID2D1CommandList_Close(command_list);
- ok(SUCCEEDED(hr), "Failed to close a list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, &target);
ok(target == NULL, "Unexpected context target.\n");
hr = ID2D1CommandList_Close(command_list);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1CommandList_Release(command_list);
/* Close empty list. */
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1CommandList_Close(command_list);
- ok(SUCCEEDED(hr), "Failed to close a list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1CommandList_Release(command_list);
@@ -9160,7 +9160,7 @@ static void test_command_list(BOOL d3d11)
ok(device_context2 != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_SetTarget(device_context2, (ID2D1Image *)command_list);
ID2D1DeviceContext_GetTarget(device_context2, &target);
@@ -9213,21 +9213,21 @@ static void test_max_bitmap_size(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(device_types); ++i)
{
if (FAILED(hr = D3D10CreateDevice1(NULL, device_types[i].type, NULL, D3D10_CREATE_DEVICE_BGRA_SUPPORT,
D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &device)))
{
- skip("Failed to create %s d3d device, hr %#x.\n", device_types[i].name, hr);
+ skip("Failed to create %s d3d device, hr %#lx.\n", device_types[i].name, hr);
continue;
}
window = create_window();
swapchain = create_d3d10_swapchain(device, window, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < ARRAY_SIZE(target_types); ++j)
{
@@ -9244,8 +9244,7 @@ static void test_max_bitmap_size(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, &desc, &rt);
- ok(SUCCEEDED(hr), "%s/%s: failed to create render target, hr %#x.\n", device_types[i].name,
- target_types[j].name, hr);
+ ok(hr == S_OK, "%s/%s: Got unexpected hr %#lx.\n", device_types[i].name, target_types[j].name, hr);
bitmap_size = ID2D1RenderTarget_GetMaximumBitmapSize(rt);
ok(bitmap_size >= D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION, "%s/%s: unexpected bitmap size %u.\n",
@@ -9259,7 +9258,7 @@ static void test_max_bitmap_size(BOOL d3d11)
size.width = bitmap_size;
size.height = 1;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap);
ID2D1RenderTarget_Release(rt);
@@ -9277,8 +9276,8 @@ static void test_max_bitmap_size(BOOL d3d11)
texture_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr) || broken(hr == E_INVALIDARG && device_types[i].type == D3D10_DRIVER_TYPE_WARP) /* Vista */,
- "%s/%s: failed to create texture, hr %#x.\n", device_types[i].name, target_types[j].name, hr);
+ ok(hr == S_OK || broken(hr == E_INVALIDARG && device_types[i].type == D3D10_DRIVER_TYPE_WARP) /* Vista */,
+ "%s/%s: Got unexpected hr %#lx.\n", device_types[i].name, target_types[j].name, hr);
if (SUCCEEDED(hr))
ID3D10Texture2D_Release(texture);
}
@@ -9355,7 +9354,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
/* Native accepts negative DPI values for DXGI surface bitmap. */
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ID2D1DeviceContext_SetDpi(device_context, dc_dpi_x, dc_dpi_y);
@@ -9370,7 +9369,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9384,7 +9383,7 @@ static void test_dpi(BOOL d3d11)
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(create_dpi_tests); ++i)
{
IWICBitmapSource *wic_bitmap_src;
@@ -9394,9 +9393,9 @@ static void test_dpi(BOOL d3d11)
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IWICBitmap_QueryInterface(wic_bitmap, &IID_IWICBitmapSource, (void **)&wic_bitmap_src);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
IWICBitmap_Release(wic_bitmap);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_UNKNOWN;
@@ -9406,7 +9405,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmapFromWicBitmap(device_context, wic_bitmap_src, &bitmap_desc, &bitmap);
- ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n",
i, hr, create_dpi_tests[i].hr);
IWICBitmapSource_Release(wic_bitmap_src);
@@ -9433,7 +9432,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9459,7 +9458,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n",
i, hr, create_dpi_tests[i].hr);
if (FAILED(hr))
@@ -9485,7 +9484,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9536,16 +9535,16 @@ static void test_wic_bitmap_format(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(hr == S_OK, "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
tests[i].wic, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(hr == S_OK, "%s: Failed to create WIC bitmap, hr %#x.\n", debugstr_guid(tests[i].wic), hr);
+ ok(hr == S_OK, "%s: Got unexpected hr %#lx.\n", debugstr_guid(tests[i].wic), hr);
hr = ID2D1RenderTarget_CreateBitmapFromWicBitmap(rt, (IWICBitmapSource *)wic_bitmap, NULL, &bitmap);
- ok(hr == S_OK, "%s: Failed to create bitmap from WIC source, hr %#x.\n", debugstr_guid(tests[i].wic), hr);
+ ok(hr == S_OK, "%s: Got unexpected hr %#lx.\n", debugstr_guid(tests[i].wic), hr);
format = ID2D1Bitmap_GetPixelFormat(bitmap);
ok(format.format == tests[i].d2d.format, "%s: Got unexpected DXGI format %#x.\n",
@@ -9740,22 +9739,22 @@ static void test_geometry_group(BOOL d3d11)
BOOL match;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometries[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -2.0f, -2.0f, 0.0f, 2.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometries[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateGeometryGroup(factory, D2D1_FILL_MODE_ALTERNATE, geometries, 2, &group);
- ok(SUCCEEDED(hr), "Failed to create geometry group, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1GeometryGroup_GetBounds(group, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry group bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -2.0f, -2.0f, 1.0f, 2.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -9764,7 +9763,7 @@ static void test_geometry_group(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1GeometryGroup_GetBounds(group, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry group bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 76.0f, 639.0f, 82.0f, 641.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -9795,10 +9794,10 @@ static void test_mt_factory(BOOL d3d11)
DWORD ret;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED + 1, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_QueryInterface(factory, &IID_ID2D1Multithread, (void **)&multithread);
if (hr == E_NOINTERFACE)
@@ -9807,7 +9806,7 @@ static void test_mt_factory(BOOL d3d11)
ID2D1Factory_Release(factory);
return;
}
- ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = ID2D1Multithread_GetMultithreadProtected(multithread);
ok(!ret, "Unexpected return value.\n");
@@ -9822,10 +9821,10 @@ static void test_mt_factory(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_QueryInterface(factory, &IID_ID2D1Multithread, (void **)&multithread);
- ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = ID2D1Multithread_GetMultithreadProtected(multithread);
ok(!!ret, "Unexpected return value.\n");
@@ -9887,7 +9886,7 @@ static void test_effect(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(effect_tests); ++i)
{
@@ -9896,82 +9895,74 @@ static void test_effect(BOOL d3d11)
winetest_push_context("Test %u", i);
hr = ID2D1DeviceContext_CreateEffect(context, test->clsid, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_QueryInterface(effect, &IID_ID2D1Image, (void **)&image_a);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &image_b);
ok(image_b == image_a, "Got unexpected image_b %p, expected %p.\n", image_b, image_a);
ID2D1Image_Release(image_b);
ID2D1Image_Release(image_a);
hr = ID2D1Effect_GetValue(effect, 0xdeadbeef, D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == D2DERR_INVALID_PROPERTY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_PROPERTY, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid) + 1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid) - 1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, sizeof(buffer));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
str_size = (wcslen((WCHAR *)buffer) + 1) * sizeof(WCHAR);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size);
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size - 1);
- todo_wine
- ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, 0xdeadbeef, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_UNKNOWN, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_VECTOR4, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_VECTOR4, buffer, sizeof(buffer));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID,
D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(IsEqualGUID(&clsid, test->clsid), "Got unexpected clsid %s, expected %s.\n",
- debugstr_guid(&clsid), debugstr_guid(test->clsid));
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(IsEqualGUID(&clsid, test->clsid), "Got unexpected clsid %s, expected %s.\n",
+ debugstr_guid(&clsid), debugstr_guid(test->clsid));
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CACHED,
D2D1_PROPERTY_TYPE_BOOL, (BYTE *)&cached, sizeof(cached));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(cached == FALSE, "Got unexpected cached %d.\n", cached);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_PRECISION,
D2D1_PROPERTY_TYPE_ENUM, (BYTE *)&precision, sizeof(precision));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %u.\n", precision);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&min_inputs, sizeof(min_inputs));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(min_inputs == test->min_inputs, "Got unexpected min inputs %u, expected %u.\n",
- min_inputs, test->min_inputs);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(min_inputs == test->min_inputs, "Got unexpected min inputs %u, expected %u.\n",
+ min_inputs, test->min_inputs);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&max_inputs, sizeof(max_inputs));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n",
- max_inputs, test->max_inputs);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n",
+ max_inputs, test->max_inputs);
input_count = ID2D1Effect_GetInputCount(effect);
- ok (input_count == test->default_input_count, "Got unexpected input count %u, expected %u.\n",
+ ok(input_count == test->default_input_count, "Got unexpected input count %u, expected %u.\n",
input_count, test->default_input_count);
input_count = (test->max_inputs < 16 ? test->max_inputs : 16);
@@ -9980,9 +9971,9 @@ static void test_effect(BOOL d3d11)
winetest_push_context("Input %u", j);
hr = ID2D1Effect_SetInputCount(effect, j);
if (j < test->min_inputs || j > test->max_inputs)
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
else
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
winetest_pop_context();
}
@@ -10001,7 +9992,7 @@ static void test_effect(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(ctx.rt, size, NULL, 4, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
for (j = 0; j < input_count + 4; ++j)
@@ -10120,10 +10111,10 @@ static void test_effect_2d_affine(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D12DAffineTransform, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(effect_2d_affine_tests); ++i)
{
@@ -10139,13 +10130,13 @@ static void test_effect_2d_affine(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(context, input_size, test->img_data,
sizeof(*test->img_data) * test->img_width, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
todo_wine
hr = ID2D1Effect_SetValue(effect, D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX,
D2D1_PROPERTY_TYPE_MATRIX_3X2, (const BYTE *)test->matrix, sizeof(*test->matrix));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &output);
ID2D1DeviceContext_GetImageLocalBounds(context, output, &output_bounds);
@@ -10168,7 +10159,7 @@ static void test_effect_2d_affine(BOOL d3d11)
offset.y = 240.0f;
ID2D1DeviceContext_DrawImage(context, output, &offset, NULL, 0, 0);
hr = ID2D1DeviceContext_EndDraw(context, NULL, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
x = offset.x + output_bounds.left - 2.0f;
y = offset.y + output_bounds.top - 2.0f;
@@ -10232,10 +10223,10 @@ static void test_effect_crop(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D1Crop, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(crop_effect_tests); ++i)
{
@@ -10251,12 +10242,12 @@ static void test_effect_crop(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(context, input_size, image,
sizeof(*image) * 16, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
hr = ID2D1Effect_SetValue(effect, D2D1_CROP_PROP_RECT, D2D1_PROPERTY_TYPE_VECTOR4,
(const BYTE *)&test->crop_rect, sizeof(test->crop_rect));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &output);
set_rect(&output_bounds, -1.0f, -1.0f, -1.0f, -1.0f);
@@ -10458,11 +10449,11 @@ static void test_stroke_contains_point(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rectangle);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(rectangle_tests); ++i)
{
const struct contains_point_test *test = &rectangle_tests[i];
@@ -10472,7 +10463,7 @@ static void test_stroke_contains_point(BOOL d3d11)
contains = !test->contains;
hr = ID2D1RectangleGeometry_StrokeContainsPoint(rectangle, test->point, test->stroke_width,
NULL, test->matrix ? &test->transform : NULL, test->tolerance, &contains);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == test->contains, "Got unexpected result %#x.\n", contains);
winetest_pop_context();
@@ -10480,9 +10471,9 @@ static void test_stroke_contains_point(BOOL d3d11)
ID2D1RectangleGeometry_Release(rectangle);
hr = ID2D1Factory_CreatePathGeometry(factory, &path);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(path, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* A limaçon. */
set_point(&point, 160.0f, 720.0f);
@@ -10524,7 +10515,7 @@ static void test_stroke_contains_point(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
for (i = 0; i < ARRAY_SIZE(path_tests); ++i)
@@ -10536,7 +10527,7 @@ static void test_stroke_contains_point(BOOL d3d11)
contains = !test->contains;
hr = ID2D1PathGeometry_StrokeContainsPoint(path, test->point, test->stroke_width,
NULL, test->matrix ? &test->transform : NULL, test->tolerance, &contains);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == test->contains, "Got unexpected result %#x.\n", contains);
winetest_pop_context();
--
2.30.2
2
1
[PATCH 3/5] d2d1/tests: Declare "level" as D3D_FEATURE_LEVEL in create_d3d11_device().
by Henri Verbeet Feb. 3, 2022
by Henri Verbeet Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 314d8b7ce60d..003aad605054 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -824,7 +824,7 @@ static ID3D10Device1 *create_d3d10_device(void)
static ID3D11Device *create_d3d11_device(void)
{
- DWORD level = D3D_FEATURE_LEVEL_11_0;
+ D3D_FEATURE_LEVEL level = D3D_FEATURE_LEVEL_11_0;
ID3D11Device *device;
if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL,
--
2.30.2
2
1
[PATCH 2/5] d2d1/tests: Pass the hash size as DWORD in compare_sha1().
by Henri Verbeet Feb. 3, 2022
by Henri Verbeet Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index b0aa02ad2a90..314d8b7ce60d 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -536,6 +536,7 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
HCRYPTPROV provider;
BYTE hash_data[20];
HCRYPTHASH hash;
+ DWORD hash_size;
unsigned int i;
char sha1[41];
BOOL ret;
@@ -552,10 +553,10 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
}
ok(ret, "Failed to hash data.\n");
- i = sizeof(hash_data);
- ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &i, 0);
+ hash_size = sizeof(hash_data);
+ ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &hash_size, 0);
ok(ret, "Failed to get hash value.\n");
- ok(i == sizeof(hash_data), "Got unexpected hash size %u.\n", i);
+ ok(hash_size == sizeof(hash_data), "Got unexpected hash size %u.\n", hash_size);
ret = CryptDestroyHash(hash);
ok(ret, "Failed to destroy hash.\n");
--
2.30.2
2
1
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3d10_1/tests/Makefile.in | 1 -
dlls/d3d10_1/tests/d3d10_1.c | 104 ++++++++++++++++-----------------
2 files changed, 52 insertions(+), 53 deletions(-)
diff --git a/dlls/d3d10_1/tests/Makefile.in b/dlls/d3d10_1/tests/Makefile.in
index 97eaf324ff78..256bb407d414 100644
--- a/dlls/d3d10_1/tests/Makefile.in
+++ b/dlls/d3d10_1/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3d10_1.dll
IMPORTS = d3d10_1 user32
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
index 51da614d9d76..33abd919a031 100644
--- a/dlls/d3d10_1/tests/d3d10_1.c
+++ b/dlls/d3d10_1/tests/d3d10_1.c
@@ -87,7 +87,7 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID iid, BOOL
hr = IUnknown_QueryInterface(unknown, iid, (void **)&out);
ok_(__FILE__, line)(hr == expected_hr || broken(is_broken && hr == broken_hr),
- "Got hr %#x, expected %#x.\n", hr, expected_hr);
+ "Got unexpected hr %#lx, expected %#lx.\n", hr, expected_hr);
if (SUCCEEDED(hr))
IUnknown_Release(out);
return hr;
@@ -128,18 +128,18 @@ static void test_create_device(void)
hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDevice1(NULL, 0xffffffff, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &device);
- todo_wine ok(hr == E_INVALIDARG, "D3D10CreateDevice1 returned %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!device, "Got unexpected device pointer %p.\n", device);
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
0, D3D10_1_SDK_VERSION, &device);
- ok(hr == E_INVALIDARG, "D3D10CreateDevice1 returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!device, "Got unexpected device pointer %p.\n", device);
window = CreateWindowA("static", "d3d10_1_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -162,13 +162,13 @@ static void test_create_device(void)
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_interface(swapchain, &IID_IDXGISwapChain1, TRUE, FALSE);
memset(&obtained_desc, 0, sizeof(obtained_desc));
hr = IDXGISwapChain_GetDesc(swapchain, &obtained_desc);
- ok(SUCCEEDED(hr), "GetDesc failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(obtained_desc.BufferDesc.Width == swapchain_desc.BufferDesc.Width,
"Got unexpected BufferDesc.Width %u.\n", obtained_desc.BufferDesc.Width);
ok(obtained_desc.BufferDesc.Height == swapchain_desc.BufferDesc.Height,
@@ -203,56 +203,56 @@ static void test_create_device(void)
"Got unexpected Flags %#x.\n", obtained_desc.Flags);
refcount = IDXGISwapChain_Release(swapchain);
- ok(!refcount, "Swapchain has %u references left.\n", refcount);
+ ok(!refcount, "Swapchain has %lu references left.\n", refcount);
feature_level = ID3D10Device1_GetFeatureLevel(device);
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
feature_level, supported_feature_level);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL, NULL, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
0, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
swapchain = (IDXGISwapChain *)0xdeadbeef;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
swapchain_desc.OutputWindow = NULL;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, NULL, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D10Device1 *)0xdeadbeef;
swapchain_desc.OutputWindow = NULL;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
+ ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
@@ -262,7 +262,7 @@ static void test_create_device(void)
swapchain_desc.BufferDesc.Format = DXGI_FORMAT_BC5_UNORM;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == E_INVALIDARG, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
@@ -317,7 +317,7 @@ static void test_device_interfaces(void)
IDXGIDevice_Release(dxgi_device);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
for (i = 0; i < ARRAY_SIZE(d3d10_feature_levels); ++i)
@@ -336,7 +336,7 @@ static void test_device_interfaces(void)
check_interface(device, &IID_ID3D10InfoQueue, TRUE, FALSE);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
}
@@ -366,10 +366,10 @@ static void test_create_shader_resource_view(void)
buffer_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateBuffer(device, &buffer_desc, NULL, &buffer);
- ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, NULL, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
srv_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
srv_desc.ViewDimension = D3D10_1_SRV_DIMENSION_BUFFER;
@@ -377,19 +377,19 @@ static void test_create_shader_resource_view(void)
U(srv_desc).Buffer.ElementWidth = 64;
hr = ID3D10Device1_CreateShaderResourceView1(device, NULL, &srv_desc, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount((IUnknown *)device) + 1;
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
- ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = get_refcount((IUnknown *)device);
- ok(refcount >= expected_refcount, "Got unexpected refcount %u, expected >= %u.\n", refcount, expected_refcount);
+ ok(refcount >= expected_refcount, "Got unexpected refcount %lu, expected >= %lu.\n", refcount, expected_refcount);
tmp_device = NULL;
expected_refcount = refcount + 1;
ID3D10ShaderResourceView1_GetDevice(srview, &tmp_device);
ok(tmp_device == (ID3D10Device *)device, "Got unexpected device %p, expected %p.\n", tmp_device, device);
refcount = get_refcount((IUnknown *)device);
- ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", refcount, expected_refcount);
+ ok(refcount == expected_refcount, "Got unexpected refcount %lu, expected %lu.\n", refcount, expected_refcount);
ID3D10Device_Release(tmp_device);
check_interface(srview, &IID_ID3D10ShaderResourceView, TRUE, FALSE);
@@ -407,10 +407,10 @@ static void test_create_shader_resource_view(void)
buffer_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateBuffer(device, &buffer_desc, NULL, &buffer);
- ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID3D10Buffer_Release(buffer);
@@ -427,10 +427,10 @@ static void test_create_shader_resource_view(void)
texture_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)texture, NULL, &srview);
- ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10ShaderResourceView1_GetDesc1(srview, &srv_desc);
ok(srv_desc.Format == texture_desc.Format, "Got unexpected format %#x.\n", srv_desc.Format);
@@ -448,7 +448,7 @@ static void test_create_shader_resource_view(void)
ID3D10Texture2D_Release(texture);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_create_blend_state(void)
@@ -557,7 +557,7 @@ static void test_create_blend_state(void)
}
hr = ID3D10Device1_CreateBlendState1(device, NULL, &blend_state1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc));
desc.AlphaToCoverageEnable = FALSE;
@@ -573,18 +573,18 @@ static void test_create_blend_state(void)
expected_refcount = get_refcount((IUnknown *)device) + 1;
hr = ID3D10Device1_CreateBlendState1(device, &desc, &blend_state1);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateBlendState1(device, &desc, &blend_state2);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(blend_state1 == blend_state2, "Got different blend state objects.\n");
refcount = get_refcount((IUnknown *)device);
- ok(refcount >= expected_refcount, "Got unexpected refcount %u, expected >= %u.\n", refcount, expected_refcount);
+ ok(refcount >= expected_refcount, "Got unexpected refcount %lu, expected >= %lu.\n", refcount, expected_refcount);
tmp = NULL;
expected_refcount = refcount + 1;
ID3D10BlendState1_GetDevice(blend_state1, &tmp);
ok(tmp == (ID3D10Device *)device, "Got unexpected device %p, expected %p.\n", tmp, device);
refcount = get_refcount((IUnknown *)device);
- ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", refcount, expected_refcount);
+ ok(refcount == expected_refcount, "Got unexpected refcount %lu, expected %lu.\n", refcount, expected_refcount);
ID3D10Device_Release(tmp);
ID3D10BlendState1_GetDesc1(blend_state1, &obtained_desc);
@@ -625,16 +625,16 @@ static void test_create_blend_state(void)
check_interface(blend_state1, &IID_ID3D11BlendState, TRUE, TRUE);
refcount = ID3D10BlendState1_Release(blend_state1);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID3D10BlendState1_Release(blend_state2);
- ok(!refcount, "Blend state has %u references left.\n", refcount);
+ ok(!refcount, "Blend state has %lu references left.\n", refcount);
for (i = 0; i < ARRAY_SIZE(desc_conversion_tests); ++i)
{
const D3D10_BLEND_DESC1 *current_desc = &desc_conversion_tests[i];
hr = ID3D10Device1_CreateBlendState1(device, current_desc, &blend_state1);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10BlendState1_QueryInterface(blend_state1, &IID_ID3D10BlendState, (void **)&d3d10_blend_state);
ok(SUCCEEDED(hr), "Blend state should implement ID3D10BlendState.\n");
@@ -669,11 +669,11 @@ static void test_create_blend_state(void)
ID3D10BlendState_Release(d3d10_blend_state);
refcount = ID3D10BlendState1_Release(blend_state1);
- ok(!refcount, "Got unexpected refcount %u.\n", refcount);
+ ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
}
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_getdc(void)
@@ -708,47 +708,47 @@ static void test_getdc(void)
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface1, (void**)&surface1);
- ok(SUCCEEDED(hr), "Failed to get IDXGISurface1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
IDXGISurface1_Release(surface1);
ID3D10Texture2D_Release(texture);
desc.MiscFlags = D3D10_RESOURCE_MISC_GDI_COMPATIBLE;
hr = ID3D10Device1_CreateTexture2D(device, &desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface1, (void**)&surface1);
- ok(SUCCEEDED(hr), "Failed to get IDXGISurface1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* One more time. */
dc = (HDC)0xdeadbeef;
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok(dc == (HDC)0xdeadbeef, "Got unexpected dc %p.\n", dc);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
IDXGISurface1_Release(surface1);
ID3D10Texture2D_Release(texture);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
START_TEST(d3d10_1)
--
2.30.2
1
0
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3dx11_42/tests/Makefile.in | 1 -
dlls/d3dx11_43/tests/Makefile.in | 1 -
dlls/d3dx11_43/tests/d3dx11.c | 145 ++++++++++++++++---------------
3 files changed, 73 insertions(+), 74 deletions(-)
diff --git a/dlls/d3dx11_42/tests/Makefile.in b/dlls/d3dx11_42/tests/Makefile.in
index a4ea6f1a0277..660f6d947cce 100644
--- a/dlls/d3dx11_42/tests/Makefile.in
+++ b/dlls/d3dx11_42/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3dx11_42.dll
IMPORTS = d3dx11_42
PARENTSRC = ../../d3dx11_43/tests
diff --git a/dlls/d3dx11_43/tests/Makefile.in b/dlls/d3dx11_43/tests/Makefile.in
index 11bb7763a01b..6e522df66fb9 100644
--- a/dlls/d3dx11_43/tests/Makefile.in
+++ b/dlls/d3dx11_43/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3dx11_43.dll
IMPORTS = d3dx11
diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c
index fe33089a5414..89fc0721c922 100644
--- a/dlls/d3dx11_43/tests/d3dx11.c
+++ b/dlls/d3dx11_43/tests/d3dx11.c
@@ -316,42 +316,42 @@ static void test_D3DX11CreateAsyncMemoryLoader(void)
void *ptr;
hr = D3DX11CreateAsyncMemoryLoader(NULL, 0, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncMemoryLoader(NULL, 0, &loader);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncMemoryLoader(&data, 0, &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
size = 100;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr == &data, "Got data pointer %p, original %p.\n", ptr, &data);
ok(!size, "Got unexpected data size.\n");
/* Load() is no-op. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
data = 0;
hr = D3DX11CreateAsyncMemoryLoader(&data, sizeof(data), &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Load() is no-op. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr == &data, "Got data pointer %p, original %p.\n", ptr, &data);
ok(size == sizeof(data), "Got unexpected data size.\n");
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
}
static void create_testfile(WCHAR *path, const void *data, int data_len)
@@ -364,7 +364,7 @@ static void create_testfile(WCHAR *path, const void *data, int data_len)
lstrcatW(path, L"asyncloader.data");
file = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Test file creation failed, at %s, error %d.\n",
+ ok(file != INVALID_HANDLE_VALUE, "Test file creation failed, at %s, error %ld.\n",
wine_dbgstr_w(path), GetLastError());
ret = WriteFile(file, data, data_len, &written, NULL);
@@ -385,59 +385,59 @@ static void test_D3DX11CreateAsyncFileLoader(void)
BOOL ret;
hr = D3DX11CreateAsyncFileLoaderA(NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncFileLoaderA(NULL, &loader);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncFileLoaderA("nonexistentfilename", &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Test file sharing using dummy empty file. */
create_testfile(path, test_data1, sizeof(test_data1));
hr = D3DX11CreateAsyncFileLoaderW(path, &loader);
- ok(SUCCEEDED(hr), "Failed to create file loader, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
/* File was removed before Load(). */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Load() returned unexpected result, hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
/* Create it again. */
create_testfile(path, test_data1, sizeof(test_data1));
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Already loaded. */
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
/* Already loaded, file removed. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Load() returned unexpected result, hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
/* Decompress still works. */
ptr = NULL;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(SUCCEEDED(hr), "Decompress() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr);
ok(size == sizeof(test_data1), "Got unexpected decompressed size.\n");
if (size == sizeof(test_data1))
@@ -447,21 +447,21 @@ static void test_D3DX11CreateAsyncFileLoader(void)
create_testfile(path, test_data2, sizeof(test_data2));
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ptr = NULL;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(SUCCEEDED(hr), "Decompress() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr);
ok(size == sizeof(test_data2), "Got unexpected decompressed size.\n");
if (size == sizeof(test_data2))
ok(!memcmp(ptr, test_data2, size), "Got unexpected file data.\n");
hr = ID3DX11DataLoader_Destroy(loader);
- ok(SUCCEEDED(hr), "Destroy() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
}
static void test_D3DX11CreateAsyncResourceLoader(void)
@@ -470,22 +470,22 @@ static void test_D3DX11CreateAsyncResourceLoader(void)
HRESULT hr;
hr = D3DX11CreateAsyncResourceLoaderA(NULL, NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderA(NULL, NULL, &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderA(NULL, "noname", &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, NULL, &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, L"noname", &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
}
static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE include_type,
@@ -574,8 +574,9 @@ static void test_D3DX11CompileFromFile(void)
create_file(L"include1.h", include1, strlen(include1), NULL);
create_file(L"include\\include2.h", include2, strlen(include2), NULL);
- hr = D3DX11CompileFromFileW(filename, NULL, &include.ID3DInclude_iface, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ hr = D3DX11CompileFromFileW(filename, NULL, &include.ID3DInclude_iface,
+ "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -588,7 +589,7 @@ static void test_D3DX11CompileFromFile(void)
* instead of using the immediate parent, as it would be the case for
* standard C preprocessor includes. */
hr = D3DX11CompileFromFileW(filename, NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -600,7 +601,7 @@ static void test_D3DX11CompileFromFile(void)
len = WideCharToMultiByte(CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, filename, -1, filename_a, len, NULL, NULL);
hr = D3DX11CompileFromFileA(filename_a, NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -613,7 +614,7 @@ static void test_D3DX11CompileFromFile(void)
SetCurrentDirectoryW(temp_dir);
hr = D3DX11CompileFromFileW(L"source.ps", NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -730,7 +731,7 @@ static void check_dds_pixel_format_(unsigned int line, DWORD flags, DWORD fourcc
memset(dds.data, 0, sizeof(dds.data));
hr = D3DX11GetImageInfoFromMemory(&dds, sizeof(dds), NULL, &info, NULL);
- ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#x for pixel format %#x.\n", hr, expected_format);
+ ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx for pixel format %#x.\n", hr, expected_format);
if (SUCCEEDED(hr))
{
ok_(__FILE__, line)(info.Format == expected_format, "Unexpected format %#x, expected %#x\n",
@@ -750,50 +751,50 @@ static void test_D3DX11GetImageInfoFromMemory(void)
}
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp) + 5, NULL, &info, NULL); /* too large size */
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, sizeof(noimage), NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, sizeof(noimage), NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp) - 1, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp + 1, sizeof(bmp_1bpp) - 1, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 4, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 4, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
/* test BMP support */
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -805,10 +806,10 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_2bpp, sizeof(bmp_2bpp), NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_4bpp, sizeof(bmp_4bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -820,7 +821,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_8bpp, sizeof(bmp_8bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -832,7 +833,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_32bpp_xrgb, sizeof(bmp_32bpp_xrgb), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -844,7 +845,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -857,7 +858,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
/* Grayscale PNG */
hr = D3DX11GetImageInfoFromMemory(png_grayscale, sizeof(png_grayscale), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -870,7 +871,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
/* test DDS support */
hr = D3DX11GetImageInfoFromMemory(dds_24bit, sizeof(dds_24bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -881,7 +882,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_24bit, sizeof(dds_24bit) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -892,7 +893,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_16bit, sizeof(dds_16bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -904,7 +905,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
memset(&info, 0, sizeof(info));
hr = D3DX11GetImageInfoFromMemory(dds_16bit, sizeof(dds_16bit) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -916,7 +917,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
memset(&info, 0, sizeof(info));
hr = D3DX11GetImageInfoFromMemory(dds_8bit, sizeof(dds_8bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 16, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -927,7 +928,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_cube_map, sizeof(dds_cube_map), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -938,7 +939,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_cube_map, sizeof(dds_cube_map) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -949,7 +950,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_volume_map, sizeof(dds_volume_map), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 2, "Unexpected depth %u.\n", info.Depth);
@@ -960,7 +961,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_volume_map, sizeof(dds_volume_map) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 2, "Unexpected depth %u.\n", info.Depth);
--
2.30.2
1
0
[PATCH v3 2/2] user32: DefWindowProc(WM_NCCALCSIZE) should return 0.
by Dmitry Timoshkov Feb. 3, 2022
by Dmitry Timoshkov Feb. 3, 2022
Feb. 3, 2022
v3: As suggested by Alexandre changed NC_HandleNCCalcSize to not return a value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37609
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/user32/controls.h | 2 +-
dlls/user32/defwnd.c | 3 ++-
dlls/user32/nonclient.c | 9 ++-------
dlls/user32/tests/win.c | 6 ------
4 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index ce14d13171f..52584748768 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -168,7 +168,7 @@ extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN;
/* nonclient area */
extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
-extern LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
+extern void NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index abb73e73ca8..a8978c2d847 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -260,7 +260,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
case WM_NCCALCSIZE:
- return NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
+ NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
+ break;
case WM_WINDOWPOSCHANGING:
return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam );
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 639cca707fb..f944ed568a4 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -346,19 +346,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH AdjustWindowRectExForDpi( LPRECT rect, DWORD style
*
* Handle a WM_NCCALCSIZE message. Called from DefWindowProc().
*/
-LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
+void NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
{
RECT tmpRect = { 0, 0, 0, 0 };
- LRESULT result = 0;
LONG cls_style = GetClassLongW(hwnd, GCL_STYLE);
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG exStyle = GetWindowLongW( hwnd, GWL_EXSTYLE );
if (winRect == NULL)
- return 0;
-
- if (cls_style & CS_VREDRAW) result |= WVR_VREDRAW;
- if (cls_style & CS_HREDRAW) result |= WVR_HREDRAW;
+ return;
if (!(style & WS_MINIMIZE))
{
@@ -413,7 +409,6 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
winRect->right = winRect->left;
winRect->bottom = winRect->top;
}
- return result;
}
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 4aeb3816db2..847093710a5 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -1236,7 +1236,6 @@ static void test_nonclient_area(HWND hwnd)
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
-todo_wine_if(ret != 0)
ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
@@ -1255,7 +1254,6 @@ todo_wine_if(ret != 0)
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
-todo_wine_if(ret != 0)
ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
@@ -12673,25 +12671,21 @@ static void test_WM_NCCALCSIZE(void)
params.lppos = &winpos;
ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
params.rgrc[0] = window_rect;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
GetWindowRect(hwnd, &window_rect);
ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
GetWindowRect(hwnd, &window_rect);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
--
2.34.1
2
2
This simplifies getting a connection to the TestAgent server with
elevated privileges.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/LibvirtTool.pl | 60 ++++++++++++++++++++------------------
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index b186e19c39..51ed8e73e8 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -257,6 +257,28 @@ sub ChangeStatus($$;$)
return 0;
}
+=pod
+=over 12
+
+=item C<GetPrivilegedTA()>
+
+Returns a connection to a TestAgent server with elevated privileges.
+
+If the server running on the regular port does not have elevated privileges
+this assumes that the one on the alternate port will. It is up to the caller
+to report an error if that's not the case.
+
+=back
+=cut
+
+sub GetPrivilegedTA($)
+{
+ my ($TA) = @_;
+
+ # Use SetTime() to detect if privileged operations are allowed.
+ return $TA->SetTime() ? $TA : $VM->GetAgent(1);
+}
+
sub ShutDown()
{
my $Domain = $VM->GetDomain();
@@ -270,30 +292,15 @@ sub ShutDown()
Debug(Elapsed($Start), " Performing a clean shutdown of $VMKey $CurrentSnapshot\n");
LogMsg "Performing a clean shutdown of $VMKey $CurrentSnapshot\n";
- # Use SetTime() to detect if privileged operations are allowed.
- my $TA = $VM->GetAgent();
- if (!$TA->SetTime())
- {
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- $TA->Disconnect();
- $TA = $VM->GetAgent(1);
- if (!$TA->SetTime())
- {
- Error "Unable to get a privileged TestAgent: ". $TA->GetLastError() ."\n";
- $TA->Disconnect();
- return 0;
- }
- }
-
my $Success = 1;
my $Cmd = $VM->Type =~ /^win(?:32|64)$/ ?
["shutdown.exe", "/p", "/d", "00:00"] :
["/sbin/shutdown", "--poweroff", "now"];
Debug(Elapsed($Start), " Running @$Cmd\n");
- if (!$TA->Run($Cmd, 0))
+ my $PTA = GetPrivilegedTA($VM->GetAgent());
+ if (!$PTA->Run($Cmd, 0))
{
- Error "Could not run @$Cmd: ". $TA->GetLastError() ."\n";
+ Error "Could not run @$Cmd: ". $PTA->GetLastError() ."\n";
$Success = 0;
}
else
@@ -311,7 +318,8 @@ sub ShutDown()
sleep(1);
}
}
- $TA->Disconnect();
+ $PTA->Disconnect();
+
Debug(Elapsed($Start), " Successfully shut down $VMKey\n");
LogMsg "Successfully shut down $VMKey\n";
return $Success;
@@ -496,16 +504,11 @@ sub SetupTestAgentd($$$$)
# This is needed not only for the tests (date is important when checking
# HTTPS certificates), but also for the build (if the time moves forward
# during the build some ccache versions will return a compilation error).
- if (!$TA->SetTime())
+ my $PTA = GetPrivilegedTA($TA);
+ FatalError("Cannot set the VM system time\n") if (!$PTA);
+ if (!$PTA->SetTime())
{
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- my $PrivilegedTA = $VM->GetAgent(1);
- if (!$PrivilegedTA->SetTime())
- {
- FatalError("Unable to set the VM system time: ". $PrivilegedTA->GetLastError() ."\n");
- }
- $PrivilegedTA->Disconnect();
+ FatalError("Setting the VM system time failed: ". $PTA->GetLastError() ."\n");
}
if ($Booting and $VM->Type eq "wine")
@@ -543,6 +546,7 @@ sub SetupTestAgentd($$$$)
FatalError("The VM has been rebooted too many times: start.count=$Count > 1");
}
}
+ $PTA->Disconnect();
$TA->Disconnect();
}
--
2.30.2
1
0
Feb. 3, 2022
The special 'mx-MX' locale sets all locale settings to different values
in order to detect when the Wine tests use the wrong locale API.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/SetWinLocale | 40 +++++++++++++++++++++++++++++-----------
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index 0d4c305ceb..df0d6f7031 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -416,7 +416,7 @@ while (@ARGV)
}
# Check and untaint parameters
-my $CountryId;
+my ($Keyboard, $CountryId);
if (!defined $Usage)
{
if (!defined $OptHostName)
@@ -437,11 +437,31 @@ if (!defined $Usage)
$OptLocale ||= $OptDefault;
$OptSystem ||= $OptDefault;
$OptMUI ||= $OptDefault;
-
+ $Keyboard = $OptKeyboard || $OptDefault;
if (!$OptCountry and ($OptDefault || "") =~ /-([A-Z]{2})$/)
{
$OptCountry = $1;
}
+
+ # The "mixed" locale is used to make sure the tests each use the right
+ # locale API. To do so set each locale setting to a different value, each
+ # producing different results (e.g. different date format, decimal separator,
+ # etc).
+ my $MXStr = "";
+ sub SetMX($$$)
+ {
+ my ($Value, $Option, $MXValue) = @_;
+ return $Value if (!$Value or $Value !~ /^(?:mx-|MX$)/);
+ $MXStr .= " $Option $MXValue";
+ return $MXValue;
+ }
+ $OptLocale = SetMX($OptLocale, "--locale", "fr-FR");
+ $OptCountry = SetMX($OptCountry, "--country", "TO");
+ $OptSystem = SetMX($OptSystem, "--system", "ja-JP");
+ $OptMUI = SetMX($OptMUI, "--mui", "ko-KR");
+ $Keyboard = SetMX($Keyboard, "--keyboard", "es-ES");
+ Info("using$MXStr\n") if ($MXStr);
+
if ($OptCountry)
{
$CountryId = $Countries{$OptCountry};
@@ -453,8 +473,7 @@ if (!defined $Usage)
}
if (!$OptLocale and !$OptCountry and !$OptSystem and !$OptUTF8 and
- !$OptMUI and !$OptKeyboard and !defined $OptSysCopy and
- !defined $OptDefCopy)
+ !$OptMUI and !$Keyboard and !defined $OptSysCopy and !defined $OptDefCopy)
{
if (!$OptShow)
{
@@ -468,7 +487,7 @@ if (!defined $Usage)
}
}
if ($OptShow and ($OptLocale or $OptCountry or $OptSystem or $OptUTF8 or
- $OptMUI or $OptKeyboard or defined $OptSysCopy or
+ $OptMUI or $Keyboard or defined $OptSysCopy or
defined $OptDefCopy or defined $OptUseIntl or
defined $OptReboot))
{
@@ -822,8 +841,8 @@ sub GetKeyboardIds($)
my $LCIDLocale = GetLCID($OptLocale);
my $LCIDSystem = GetLCID($OptSystem);
-my $KeyboardIds = GetKeyboardIds($OptKeyboard || $OptDefault);
-if (!$KeyboardIds and ($OptKeyboard or $OptDefault))
+my $KeyboardIds = GetKeyboardIds($Keyboard);
+if (!$KeyboardIds and $Keyboard)
{
if ($OptKeyboard)
{
@@ -832,9 +851,8 @@ if (!$KeyboardIds and ($OptKeyboard or $OptDefault))
# intl.cpl automatically pick the appropriate keyboard but, unlike
# for Windows' initial installation, it does not make it the
# default since the system has a keyboard already.
- Warning("no known keyboard for the $OptDefault locale. Letting intl.cpl use its default.\n");
+ Warning("no known keyboard for the $Keyboard locale. Letting intl.cpl use its default.\n");
}
-$OptKeyboard ||= $OptDefault;
#
@@ -1001,7 +1019,7 @@ if ($OptMUI)
}
if ($KeyboardIds)
{
- CheckSetting($Settings, "InputMethod", $KeyboardIds->[0], "for --keyboard $OptKeyboard", 1);
+ CheckSetting($Settings, "InputMethod", $KeyboardIds->[0], "for --keyboard $Keyboard", 1);
}
if ($OptSysCopy)
@@ -1022,7 +1040,7 @@ if ($OptSysCopy)
}
if ($KeyboardIds)
{
- CheckSetting($Settings, "DefInputMethod", $KeyboardIds->[0], "for --keyboard $OptKeyboard", 1);
+ CheckSetting($Settings, "DefInputMethod", $KeyboardIds->[0], "for --keyboard $Keyboard", 1);
}
}
if (!$OptReboot and ($OptSystem or $OptMUI))
--
2.30.2
1
0
Feb. 3, 2022
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/user32/tests/win.c | 164 +++++++++++++++++++++++++++++++++++++---
1 file changed, 154 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 5ce7eb02f1c..4aeb3816db2 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -764,6 +764,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
}
case WM_WINDOWPOSCHANGED:
{
+ LRESULT ret;
RECT rc1, rc2;
WINDOWPOS *winpos = (WINDOWPOS *)lparam;
ok(winpos->x >= -32768 && winpos->x <= 32767, "bad winpos->x %d\n", winpos->x);
@@ -784,7 +785,8 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
wine_dbgstr_rect(&rc2));
GetClientRect(hwnd, &rc2);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2);
ok(EqualRect(&rc1, &rc2), "rects do not match %s / %s\n", wine_dbgstr_rect(&rc1),
wine_dbgstr_rect(&rc2));
@@ -837,6 +839,13 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
break;
case WM_MOUSEACTIVATE:
return MA_ACTIVATE;
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -867,6 +876,13 @@ static LRESULT WINAPI main_window_procW(HWND hwnd, UINT msg, WPARAM wparam, LPAR
return 0;
}
break;
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -892,6 +908,13 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
ok(!got_getminmaxinfo, "tool: WM_GETMINMAXINFO should NOT have been received before WM_NCCREATE\n");
break;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -1156,6 +1179,14 @@ static LRESULT CALLBACK test_standard_scrollbar_proc(HWND hwnd, UINT msg, WPARAM
DeleteObject(region);
return 0;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp);
+ return ret;
+ }
+
default:
return DefWindowProcA(hwnd, msg, wp, lp);
}
@@ -1204,7 +1235,9 @@ static void test_nonclient_area(HWND hwnd)
rc = rc_window;
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+todo_wine_if(ret != 0)
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
"client rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d client=%s, calc=%s\n",
@@ -1221,7 +1254,9 @@ static void test_nonclient_area(HWND hwnd)
FixedAdjustWindowRectEx(&rc_window, style, menu, exstyle);
rc = rc_window;
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+todo_wine_if(ret != 0)
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
"synthetic rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, client=%s, calc=%s\n",
@@ -2114,6 +2149,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
case WM_WINDOWPOSCHANGED:
{
+ LRESULT ret;
WINDOWPOS *winpos = (WINDOWPOS *)lparam;
RECT rc1, rc2;
@@ -2125,7 +2161,8 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2));
GetWindowRect(hwnd, &rc1);
GetClientRect(hwnd, &rc2);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2);
ok(EqualRect(&rc1, &rc2), "rects do not match, window=%s client=%s\n",
wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2));
@@ -2151,7 +2188,15 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
return 1;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
+
return DefWindowProcA(hwnd, msg, wparam, lparam);
}
@@ -2207,6 +2252,13 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
return 1;
}
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefFrameProcA(hwnd, mdi_client, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
+
case WM_CLOSE:
PostQuitMessage(0);
break;
@@ -4418,11 +4470,13 @@ static void test_validatergn(HWND hwnd)
static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc)
{
+ LRESULT ret;
RECT rc;
MoveWindow( hwnd, 0, 0, x, y, 0);
GetWindowRect( hwnd, prc);
rc = *prc;
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc);
+ ok(!ret, "got %08lx\n", ret);
if (winetest_debug > 1)
trace("window rect is %s, nccalc rect is %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(prc));
}
@@ -6314,11 +6368,14 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
}
case WM_NCCALCSIZE:
{
+ LRESULT ret;
RECT rect, *r = (RECT *)lp;
GetWindowRect( hwnd, &rect );
ok( EqualRect( &rect, r ), "passed rect %s doesn't match window rect %s\n",
wine_dbgstr_rect( r ), wine_dbgstr_rect( &rect ));
- return DefWindowProcA(hwnd, msg, wp, lp);
+ ret = DefWindowProcA(hwnd, msg, wp, lp);
+ ok(!ret, "got %08lx\n", ret);
+ return ret;
}
default:
return DefWindowProcA(hwnd, msg, wp, lp);
@@ -7228,7 +7285,8 @@ static void test_ShowWindow(void)
/* test NC area */
GetWindowRect(hwnd, &rc);
SetRect(&rcNonClient, rc.left, rc.top, rc.left, rc.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rc, &rcNonClient), "expected %s, got %s\n",
wine_dbgstr_rect(&rcNonClient), wine_dbgstr_rect(&rc));
@@ -7516,7 +7574,8 @@ static void test_ShowWindow_owned(HWND hwndMain)
/* test NC area */
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7648,7 +7707,8 @@ static void test_ShowWindow_child(HWND hwndMain)
/* test NC area */
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7776,7 +7836,8 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
/* test NC area */
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -8810,6 +8871,12 @@ static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPAR
ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%d >= %d\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom);
break;
}
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wp, lp);
}
@@ -9069,6 +9136,13 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
break;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -12555,6 +12629,75 @@ static void test_DragDetect(void)
ok(!(GetKeyState( VK_LBUTTON ) & 0x8000), "got VK_LBUTTON\n");
}
+static void test_WM_NCCALCSIZE(void)
+{
+ WNDCLASSA cls;
+ HWND hwnd;
+ NCCALCSIZE_PARAMS params;
+ WINDOWPOS winpos;
+ RECT client_rect, window_rect;
+ LRESULT ret;
+
+ cls.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW;
+ cls.lpfnWndProc = DefWindowProcA;
+ cls.cbClsExtra = 0;
+ cls.cbWndExtra = 0;
+ cls.hInstance = GetModuleHandleA(0);
+ cls.hIcon = 0;
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
+ cls.hbrBackground = GetStockObject(WHITE_BRUSH);
+ cls.lpszMenuName = NULL;
+ cls.lpszClassName = "dummy_window_class";
+ ret = RegisterClassA(&cls);
+ ok(ret, "RegisterClass error %u\n", GetLastError());
+
+ hwnd = CreateWindowExA(0, "dummy_window_class", NULL,
+ WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP,
+ 100, 100, 200, 200, 0, 0, GetModuleHandleA(NULL), NULL);
+ ok(hwnd != 0, "CreateWindowEx error %u\n", GetLastError());
+
+ GetWindowRect(hwnd, &window_rect);
+ params.rgrc[0] = window_rect;
+ params.rgrc[1] = window_rect;
+ GetClientRect(hwnd, &client_rect);
+ MapWindowPoints(hwnd, 0, (POINT *)&client_rect, 2);
+ params.rgrc[2] = client_rect;
+
+ winpos.hwnd = hwnd;
+ winpos.hwndInsertAfter = HWND_TOP;
+ winpos.x = window_rect.left;
+ winpos.y = window_rect.top;
+ winpos.cx = window_rect.right - window_rect.left;
+ winpos.cy = window_rect.bottom - window_rect.top;
+ winpos.flags = SWP_NOMOVE;
+ params.lppos = &winpos;
+
+ ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
+
+ params.rgrc[0] = window_rect;
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
+
+ GetWindowRect(hwnd, &window_rect);
+ ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
+
+ GetWindowRect(hwnd, &window_rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
+
+ DestroyWindow(hwnd);
+}
+
START_TEST(win)
{
char **argv;
@@ -12731,6 +12874,7 @@ START_TEST(win)
test_SC_SIZE();
test_cancel_mode();
test_DragDetect();
+ test_WM_NCCALCSIZE();
/* add the tests above this line */
if (hhook) UnhookWindowsHookEx(hhook);
--
2.34.1
2
2