Author: akhaldi
Date: Sat Jun 3 19:01:59 2017
New Revision: 74796
URL:
http://svn.reactos.org/svn/reactos?rev=74796&view=rev
Log:
[GDIPLUS_WINETEST] Sync with Wine Staging 2.9. CORE-13362
Modified:
trunk/rostests/winetests/gdiplus/font.c
trunk/rostests/winetests/gdiplus/region.c
trunk/rostests/winetests/gdiplus/stringformat.c
Modified: trunk/rostests/winetests/gdiplus/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/font.c?…
==============================================================================
--- trunk/rostests/winetests/gdiplus/font.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/font.c [iso-8859-1] Sat Jun 3 19:01:59 2017
@@ -553,6 +553,12 @@
stat = GdipGetFontStyle(font, &style);
expect(Ok, stat);
+ stat = GdipGetFontHeight(NULL, NULL, &fm->font_height);
+ expect(InvalidParameter, stat);
+
+ stat = GdipGetFontHeight(font, NULL, NULL);
+ expect(InvalidParameter, stat);
+
stat = GdipGetFontHeight(font, NULL, &fm->font_height);
expect(Ok, stat);
stat = GdipGetFontSize(font, &fm->font_size);
Modified: trunk/rostests/winetests/gdiplus/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/region.…
==============================================================================
--- trunk/rostests/winetests/gdiplus/region.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/region.c [iso-8859-1] Sat Jun 3 19:01:59 2017
@@ -152,6 +152,8 @@
/* some Windows versions fail to properly clear the aligned DWORD */
ok_(__FILE__, line)(data[size - 1] == buf[size - 1] || broken(data[size - 1] !=
buf[size - 1]),
"off %u: %#x != %#x\n", size - 1, data[size - 1], buf[size - 1]);
+
+ GdipDeleteRegion(region);
}
static void test_getregiondata(void)
Modified: trunk/rostests/winetests/gdiplus/stringformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/stringf…
==============================================================================
--- trunk/rostests/winetests/gdiplus/stringformat.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/stringformat.c [iso-8859-1] Sat Jun 3 19:01:59 2017
@@ -36,7 +36,7 @@
GpStringFormat *format;
GpStatus stat;
INT n, count;
- StringAlignment align, valign;
+ StringAlignment align, line_align;
StringTrimming trimming;
StringDigitSubstitute digitsub;
LANGID digitlang;
@@ -45,7 +45,7 @@
expect(Ok, stat);
GdipGetStringFormatAlign(format, &align);
- GdipGetStringFormatLineAlign(format, &valign);
+ GdipGetStringFormatLineAlign(format, &line_align);
GdipGetStringFormatHotkeyPrefix(format, &n);
GdipGetStringFormatTrimming(format, &trimming);
GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub);
@@ -53,7 +53,7 @@
expect(HotkeyPrefixNone, n);
expect(StringAlignmentNear, align);
- expect(StringAlignmentNear, align);
+ expect(StringAlignmentNear, line_align);
expect(StringTrimmingCharacter, trimming);
expect(StringDigitSubstituteUser, digitsub);
expect(LANG_NEUTRAL, digitlang);
@@ -146,11 +146,11 @@
static void test_getgenerictypographic(void)
{
- GpStringFormat *format;
+ GpStringFormat *format, *format2;
GpStatus stat;
INT flags;
INT n;
- StringAlignment align, valign;
+ StringAlignment align, line_align;
StringTrimming trimming;
StringDigitSubstitute digitsub;
LANGID digitlang;
@@ -163,9 +163,15 @@
stat = GdipStringFormatGetGenericTypographic(&format);
expect(Ok, stat);
+ stat = GdipStringFormatGetGenericTypographic(&format2);
+ expect(Ok, stat);
+ ok(format == format2, "expected same format object\n");
+ stat = GdipDeleteStringFormat(format2);
+ expect(Ok, stat);
+
GdipGetStringFormatFlags(format, &flags);
GdipGetStringFormatAlign(format, &align);
- GdipGetStringFormatLineAlign(format, &valign);
+ GdipGetStringFormatLineAlign(format, &line_align);
GdipGetStringFormatHotkeyPrefix(format, &n);
GdipGetStringFormatTrimming(format, &trimming);
GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub);
@@ -175,11 +181,29 @@
flags);
expect(HotkeyPrefixNone, n);
expect(StringAlignmentNear, align);
- expect(StringAlignmentNear, align);
+ expect(StringAlignmentNear, line_align);
expect(StringTrimmingNone, trimming);
expect(StringDigitSubstituteUser, digitsub);
expect(LANG_NEUTRAL, digitlang);
expect(0, tabcount);
+
+ /* Change format parameters, release, get format object again. */
+ stat = GdipSetStringFormatFlags(format, StringFormatFlagsNoWrap);
+ expect(Ok, stat);
+
+ stat = GdipGetStringFormatFlags(format, &flags);
+ expect(Ok, stat);
+ expect(StringFormatFlagsNoWrap, flags);
+
+ stat = GdipDeleteStringFormat(format);
+ expect(Ok, stat);
+
+ stat = GdipStringFormatGetGenericTypographic(&format);
+ expect(Ok, stat);
+
+ stat = GdipGetStringFormatFlags(format, &flags);
+ expect(Ok, stat);
+ expect(StringFormatFlagsNoWrap, flags);
stat = GdipDeleteStringFormat(format);
expect(Ok, stat);
@@ -292,12 +316,12 @@
static void test_getgenericdefault(void)
{
- GpStringFormat *format;
+ GpStringFormat *format, *format2;
GpStatus stat;
INT flags;
INT n;
- StringAlignment align, valign;
+ StringAlignment align, line_align;
StringTrimming trimming;
StringDigitSubstitute digitsub;
LANGID digitlang;
@@ -310,9 +334,15 @@
stat = GdipStringFormatGetGenericDefault(&format);
expect(Ok, stat);
+ stat = GdipStringFormatGetGenericDefault(&format2);
+ expect(Ok, stat);
+ ok(format == format2, "expected same format object\n");
+ stat = GdipDeleteStringFormat(format2);
+ expect(Ok, stat);
+
GdipGetStringFormatFlags(format, &flags);
GdipGetStringFormatAlign(format, &align);
- GdipGetStringFormatLineAlign(format, &valign);
+ GdipGetStringFormatLineAlign(format, &line_align);
GdipGetStringFormatHotkeyPrefix(format, &n);
GdipGetStringFormatTrimming(format, &trimming);
GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub);
@@ -321,11 +351,29 @@
expect(0, flags);
expect(HotkeyPrefixNone, n);
expect(StringAlignmentNear, align);
- expect(StringAlignmentNear, align);
+ expect(StringAlignmentNear, line_align);
expect(StringTrimmingCharacter, trimming);
expect(StringDigitSubstituteUser, digitsub);
expect(LANG_NEUTRAL, digitlang);
expect(0, tabcount);
+
+ /* Change default format parameters, release, get format object again. */
+ stat = GdipSetStringFormatFlags(format, StringFormatFlagsNoWrap);
+ expect(Ok, stat);
+
+ stat = GdipGetStringFormatFlags(format, &flags);
+ expect(Ok, stat);
+ expect(StringFormatFlagsNoWrap, flags);
+
+ stat = GdipDeleteStringFormat(format);
+ expect(Ok, stat);
+
+ stat = GdipStringFormatGetGenericDefault(&format);
+ expect(Ok, stat);
+
+ stat = GdipGetStringFormatFlags(format, &flags);
+ expect(Ok, stat);
+ expect(StringFormatFlagsNoWrap, flags);
stat = GdipDeleteStringFormat(format);
expect(Ok, stat);