Commit fa5d0910 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

gdiplus/tests: Add tests for GdipSetCustomLineCapWidthScale.

parent da7fe7ab
...@@ -174,12 +174,45 @@ static void test_scale(void) ...@@ -174,12 +174,45 @@ static void test_scale(void)
expect(InvalidParameter, stat); expect(InvalidParameter, stat);
stat = GdipGetCustomLineCapWidthScale(custom, NULL); stat = GdipGetCustomLineCapWidthScale(custom, NULL);
expect(InvalidParameter, stat); expect(InvalidParameter, stat);
/* valid args */
stat = GdipSetCustomLineCapWidthScale(NULL, 2.0);
expect(InvalidParameter, stat);
/* valid args: read default */
scale = (REAL)0xdeadbeef; scale = (REAL)0xdeadbeef;
stat = GdipGetCustomLineCapWidthScale(custom, &scale); stat = GdipGetCustomLineCapWidthScale(custom, &scale);
expect(Ok, stat); expect(Ok, stat);
expectf(1.0, scale); 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); GdipDeleteCustomLineCap(custom);
GdipDeletePath(path); GdipDeletePath(path);
} }
......
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