Vincent Povirk : gdiplus/tests: Accept empty metafiles having 0 size on Windows.
Alexandre Julliard
julliard at winehq.org
Tue Jun 7 11:08:16 CDT 2016
Module: wine
Branch: master
Commit: f42ff6feab01b0019a684e7dd607ea90cffaf2c1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f42ff6feab01b0019a684e7dd607ea90cffaf2c1
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Mon Jun 6 16:00:49 2016 -0500
gdiplus/tests: Accept empty metafiles having 0 size on Windows.
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdiplus/tests/metafile.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c
index 550dc6b..741f752 100644
--- a/dlls/gdiplus/tests/metafile.c
+++ b/dlls/gdiplus/tests/metafile.c
@@ -888,8 +888,10 @@ static void test_nullframerect(void) {
expect(UnitPixel, unit);
expectf(0.0, bounds.X);
expectf(0.0, bounds.Y);
- expectf(1.0, bounds.Width);
- expectf(1.0, bounds.Height);
+ ok(bounds.Width == 1.0 || broken(bounds.Width == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Width);
+ ok(bounds.Height == 1.0 || broken(bounds.Height == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Height);
stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics);
expect(Ok, stat);
@@ -908,8 +910,10 @@ static void test_nullframerect(void) {
expect(UnitPixel, unit);
expectf(0.0, bounds.X);
expectf(0.0, bounds.Y);
- expectf(1.0, bounds.Width);
- expectf(1.0, bounds.Height);
+ ok(bounds.Width == 1.0 || broken(bounds.Width == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Width);
+ ok(bounds.Height == 1.0 || broken(bounds.Height == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Height);
stat = GdipDeleteGraphics(graphics);
expect(Ok, stat);
@@ -1279,8 +1283,10 @@ static void test_frameunit(void)
expect(UnitPixel, unit);
expectf(0.0, bounds.X);
expectf(0.0, bounds.Y);
- expectf(1.0, bounds.Width);
- expectf(1.0, bounds.Height);
+ ok(bounds.Width == 1.0 || broken(bounds.Width == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Width);
+ ok(bounds.Height == 1.0 || broken(bounds.Height == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Height);
stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics);
expect(Ok, stat);
@@ -1290,8 +1296,10 @@ static void test_frameunit(void)
expect(UnitPixel, unit);
expectf(0.0, bounds.X);
expectf(0.0, bounds.Y);
- expectf(1.0, bounds.Width);
- expectf(1.0, bounds.Height);
+ ok(bounds.Width == 1.0 || broken(bounds.Width == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Width);
+ ok(bounds.Height == 1.0 || broken(bounds.Height == 0.0) /* xp sp1 */,
+ "expected 1.0, got %f\n", bounds.Height);
stat = GdipDeleteGraphics(graphics);
expect(Ok, stat);
More information about the wine-cvs
mailing list