Detlef Riekenberg : gdiplus/tests: Add tests for GdipSetCustomLineCapWidthScale.
Alexandre Julliard
julliard at winehq.org
Thu Apr 18 13:57:24 CDT 2013
Module: wine
Branch: master
Commit: fa5d09105124c122e52f96f0677371579e1d6a32
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa5d09105124c122e52f96f0677371579e1d6a32
Author: Detlef Riekenberg <wine.dev at web.de>
Date: Wed Apr 17 22:41:42 2013 +0200
gdiplus/tests: Add tests for GdipSetCustomLineCapWidthScale.
---
dlls/gdiplus/tests/customlinecap.c | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c
index 218e46d..604589e 100644
--- a/dlls/gdiplus/tests/customlinecap.c
+++ b/dlls/gdiplus/tests/customlinecap.c
@@ -174,12 +174,45 @@ static void test_scale(void)
expect(InvalidParameter, stat);
stat = GdipGetCustomLineCapWidthScale(custom, NULL);
expect(InvalidParameter, stat);
- /* valid args */
+
+ stat = GdipSetCustomLineCapWidthScale(NULL, 2.0);
+ expect(InvalidParameter, stat);
+
+ /* valid args: read default */
scale = (REAL)0xdeadbeef;
stat = GdipGetCustomLineCapWidthScale(custom, &scale);
expect(Ok, stat);
expectf(1.0, scale);
+ /* set and read back some scale values: there is no limit for the scale */
+ stat = GdipSetCustomLineCapWidthScale(custom, 2.5);
+ expect(Ok, stat);
+ scale = (REAL)0xdeadbeef;
+ stat = GdipGetCustomLineCapWidthScale(custom, &scale);
+ expect(Ok, stat);
+ expectf(2.5, scale);
+
+ stat = GdipSetCustomLineCapWidthScale(custom, 42.0);
+ expect(Ok, stat);
+ scale = (REAL)0xdeadbeef;
+ stat = GdipGetCustomLineCapWidthScale(custom, &scale);
+ expect(Ok, stat);
+ expectf(42.0, scale);
+
+ stat = GdipSetCustomLineCapWidthScale(custom, 3000.0);
+ expect(Ok, stat);
+ scale = (REAL)0xdeadbeef;
+ stat = GdipGetCustomLineCapWidthScale(custom, &scale);
+ expect(Ok, stat);
+ expectf(3000.0, scale);
+
+ stat = GdipSetCustomLineCapWidthScale(custom, 0.0);
+ expect(Ok, stat);
+ scale = (REAL)0xdeadbeef;
+ stat = GdipGetCustomLineCapWidthScale(custom, &scale);
+ expect(Ok, stat);
+ expectf(0.0, scale);
+
GdipDeleteCustomLineCap(custom);
GdipDeletePath(path);
}
More information about the wine-cvs
mailing list