[Gdiplus 6/6] Don't check for succeeding functions, they always do

Adam Petaccia adam at tpetaccia.com
Fri Jun 27 19:16:11 CDT 2008


Subject: [Gdiplus 6/6] We're not checking to see if these functions
succeed or not, they all just return Ok.
 This "tones down" the font.c tests, a little

---
 dlls/gdiplus/tests/font.c |   28 +++++++++-------------------
 1 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 4c3e9df..99e236e 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -186,39 +186,29 @@ static void test_fontfamily (void)
 
 static void test_getgenerics (void)
 {
-    GpStatus stat;
     GpFontFamily* FontFamily;
     WCHAR familyName[LF_FACESIZE];
     ZeroMemory(familyName, sizeof(familyName)/sizeof(WCHAR));
 
-    stat = GdipGetGenericFontFamilySansSerif (&FontFamily);
-    expect (Ok, stat);
-    stat = GdipGetFamilyName (FontFamily, familyName, LANG_NEUTRAL);
-    expect (Ok, stat);
+    GdipGetGenericFontFamilySansSerif (&FontFamily);
+    GdipGetFamilyName (FontFamily, familyName, LANG_NEUTRAL);
     ok ((lstrcmpiW(familyName, MicrosoftSansSerif) == 0) ||
         (lstrcmpiW(familyName,MSSansSerif) == 0),
         "Expected Microsoft Sans Serif or MS Sans Serif, got %s\n",
         debugstr_w(familyName));
-    stat = GdipDeleteFontFamily (FontFamily);
-    expect (Ok, stat);
+    GdipDeleteFontFamily (FontFamily);
 
-    stat = GdipGetGenericFontFamilySerif (&FontFamily);
-    expect (Ok, stat);
-    stat = GdipGetFamilyName (FontFamily, familyName, LANG_NEUTRAL);
-    expect (Ok, stat);
+    GdipGetGenericFontFamilySerif (&FontFamily);
+    GdipGetFamilyName (FontFamily, familyName, LANG_NEUTRAL);
     ok (lstrcmpiW(familyName, TimesNewRoman) == 0,
         "Expected Times New Roman, got %s\n", debugstr_w(familyName));
-    stat = GdipDeleteFontFamily (FontFamily);
-    expect (Ok, stat);
+    GdipDeleteFontFamily (FontFamily);
 
-    stat = GdipGetGenericFontFamilyMonospace (&FontFamily);
-    expect (Ok, stat);
-    stat = GdipGetFamilyName (FontFamily, familyName, LANG_NEUTRAL);
-    expect (Ok, stat);
+    GdipGetGenericFontFamilyMonospace (&FontFamily);
+    GdipGetFamilyName (FontFamily, familyName, LANG_NEUTRAL);
     ok (lstrcmpiW(familyName, CourierNew) == 0,
         "Expected Courier New, got %s\n", debugstr_w(familyName));
-    stat = GdipDeleteFontFamily (FontFamily);
-    expect (Ok, stat);
+    GdipDeleteFontFamily (FontFamily);
 
     GdipFree (FontFamily);
 }
-- 
1.5.4.3





More information about the wine-patches mailing list