comctl32/tests: make sure to use return values (LLVM/Clang) (1/6)

Austin English austinenglish at gmail.com
Wed Feb 16 20:19:36 CST 2011


-- 
-Austin
-------------- next part --------------
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index a4ffa2e..4889ae8 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -744,8 +744,9 @@ static void test_images(void)
     r = SendMessage(hwnd, LVM_SETIMAGELIST, 0, (LPARAM)himl);
     ok(r == 0, "should return zero\n");
 
-    r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELONG(100,50));
     /* returns dimensions */
+    r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELONG(100,50));
+    ok(r, "failed\n");
 
     r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0);
     ok(r == 0, "should be zero items\n");
@@ -977,6 +978,7 @@ static void test_checkboxes(void)
     item.mask = LVIF_STATE;
     item.stateMask = 0xffff;
     r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item);
+    expect(1, r);
     ok(item.state == 0x1aab, "state %x\n", item.state);
 
     DestroyWindow(hwnd);
@@ -3049,6 +3051,8 @@ static void test_hittest(void)
     r = SendMessage(hwnd, LVM_GETITEMSPACING, TRUE, 0);
     horiz = LOWORD(r);
     vert = HIWORD(r);
+    ok(bounds.right - bounds.left == horiz,
+        "Horizontal spacing inconsistent (%d != %d)\n", bounds.right - bounds.left, vert);
     ok(bounds.bottom - bounds.top == vert,
         "Vertical spacing inconsistent (%d != %d)\n", bounds.bottom - bounds.top, vert);
     r = SendMessage(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM)&pos);
@@ -3757,6 +3761,7 @@ static void test_notifyformat(void)
     r = SendMessage(hwnd, LVM_GETUNICODEFORMAT, 0, 0);
     expect(0, r);
     r = SendMessage(hwnd, WM_NOTIFYFORMAT, 0, NF_QUERY);
+    expect(1, r);
     /* set */
     r = SendMessage(hwnd, LVM_SETUNICODEFORMAT, 1, 0);
     expect(0, r);


More information about the wine-patches mailing list