From fa5d09105124c122e52f96f0677371579e1d6a32 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Wed, 17 Apr 2013 22:41:42 +0200 Subject: [PATCH] gdiplus/tests: Add tests for GdipSetCustomLineCapWidthScale. --- dlls/gdiplus/tests/customlinecap.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index 218e46d2c48..604589eb2af 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); } -- 2.11.4.GIT