Commit 1ff3264d authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

gdiplus/tests: Use todo_wine_if() in tests.

parent ad1a4ecd
......@@ -87,10 +87,7 @@ static void ok_path(GpPath* path, const path_test_t *expected, INT expected_size
return;
}
if(todo_size) todo_wine
ok(size == expected_size, "Path size %d does not match expected size %d\n",
size, expected_size);
else
todo_wine_if (todo_size)
ok(size == expected_size, "Path size %d does not match expected size %d\n",
size, expected_size);
......@@ -113,11 +110,7 @@ static void ok_path(GpPath* path, const path_test_t *expected, INT expected_size
stringify_point_type(expected[eidx].type, ename);
stringify_point_type(types[idx], name);
if (expected[eidx].todo || numskip) todo_wine
ok(match, "Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)\n", eidx,
ename, expected[eidx].X, expected[eidx].Y,
name, points[idx].X, points[idx].Y);
else
todo_wine_if (expected[eidx].todo || numskip)
ok(match, "Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)\n", eidx,
ename, expected[eidx].X, expected[eidx].Y,
name, points[idx].X, points[idx].Y);
......
......@@ -55,9 +55,7 @@ static void expect_guid(REFGUID expected, REFGUID got, int line, BOOL todo)
WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer, sizeof(buffer), NULL, NULL);
StringFromGUID2(expected, bufferW, sizeof(bufferW)/sizeof(bufferW[0]));
WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer2, sizeof(buffer2), NULL, NULL);
if(todo)
todo_wine ok_(__FILE__, line)(IsEqualGUID(expected, got), "Expected %s, got %s\n", buffer2, buffer);
else
todo_wine_if (todo)
ok_(__FILE__, line)(IsEqualGUID(expected, got), "Expected %s, got %s\n", buffer2, buffer);
}
......@@ -4298,10 +4296,8 @@ static void test_DrawImage_scale(void)
expect(Ok, status);
match = memcmp(dst_8x1, td[i].image, sizeof(dst_8x1)) == 0;
if (!match && td[i].todo)
todo_wine ok(match, "%d: data should match\n", i);
else
ok(match, "%d: data should match\n", i);
todo_wine_if (!match && td[i].todo)
ok(match, "%d: data should match\n", i);
if (!match)
{
UINT i, size = sizeof(dst_8x1);
......@@ -4679,9 +4675,7 @@ static void test_supported_encoders(void)
ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr);
status = GdipSaveImageToStream((GpImage *)bm, stream, &clsid, NULL);
if (td[i].todo)
todo_wine ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
else
todo_wine_if (td[i].todo)
ok(status == Ok, "GdipSaveImageToStream error %d\n", status);
IStream_Release(stream);
......
......@@ -47,11 +47,7 @@ typedef struct emfplus_check_state
static void check_record(int count, const char *desc, const struct emfplus_record *expected, const struct emfplus_record *actual)
{
if (expected->todo)
todo_wine ok(expected->record_type == actual->record_type,
"%s.%i: Expected record type 0x%x, got 0x%x\n", desc, count,
expected->record_type, actual->record_type);
else
todo_wine_if (expected->todo)
ok(expected->record_type == actual->record_type,
"%s.%i: Expected record type 0x%x, got 0x%x\n", desc, count,
expected->record_type, actual->record_type);
......@@ -142,9 +138,7 @@ static void check_emfplus(HENHMETAFILE hemf, const emfplus_record *expected, con
EnumEnhMetaFile(0, hemf, enum_emf_proc, &state, NULL);
if (expected[state.count].todo)
todo_wine ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count);
else
todo_wine_if (expected[state.count].todo)
ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count);
}
......@@ -196,9 +190,7 @@ static void check_metafile(GpMetafile *metafile, const emfplus_record *expected,
3, src_rect, src_unit, enum_metafile_proc, &state, NULL);
expect(Ok, stat);
if (expected[state.count].todo)
todo_wine ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count);
else
todo_wine_if (expected[state.count].todo)
ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count);
GdipDeleteGraphics(graphics);
......@@ -216,17 +208,13 @@ static BOOL CALLBACK play_metafile_proc(EmfPlusRecordType record_type, unsigned
if (state->expected[state->count].record_type)
{
if (state->expected[state->count].playback_todo)
todo_wine ok(stat == Ok, "%s.%i: GdipPlayMetafileRecord failed with stat %i\n", state->desc, state->count, stat);
else
todo_wine_if (state->expected[state->count].playback_todo)
ok(stat == Ok, "%s.%i: GdipPlayMetafileRecord failed with stat %i\n", state->desc, state->count, stat);
state->count++;
}
else
{
if (state->expected[state->count].playback_todo)
todo_wine ok(0, "%s: too many records\n", state->desc);
else
todo_wine_if (state->expected[state->count].playback_todo)
ok(0, "%s: too many records\n", state->desc);
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment