comctl32/tests: Don't cast NULL to an integer type.

This commit is contained in:
Michael Stefaniuc 2009-12-20 23:33:34 +01:00 committed by Alexandre Julliard
parent a29bbda1a4
commit 93d45253cd
3 changed files with 6 additions and 6 deletions

View File

@ -1756,7 +1756,7 @@ static void test_hdm_orderarray(void)
if (0) if (0)
{ {
/* null pointer, crashes native */ /* null pointer, crashes native */
ret = SendMessage(hwnd, HDM_SETORDERARRAY, 3, (LPARAM)NULL); ret = SendMessage(hwnd, HDM_SETORDERARRAY, 3, 0);
expect(FALSE, ret); expect(FALSE, ret);
} }
/* count out of limits */ /* count out of limits */

View File

@ -1945,7 +1945,7 @@ static void test_multiselect(void)
expect(items,item_count); expect(items,item_count);
/* try with NULL pointer */ /* try with NULL pointer */
r = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)NULL); r = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, 0);
expect(FALSE, r); expect(FALSE, r);
/* select all, check notifications */ /* select all, check notifications */
@ -2979,7 +2979,7 @@ static void test_hittest(void)
y = (bounds.bottom - bounds.top) / 2; y = (bounds.bottom - bounds.top) / 2;
test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE, __LINE__); test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE, __LINE__);
himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)NULL); himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, 0);
ok(himl2 == himl, "should return handle\n"); ok(himl2 == himl, "should return handle\n");
r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl); r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl);

View File

@ -924,7 +924,7 @@ static void test_itemedit(void)
fill_tree(hTree); fill_tree(hTree);
/* try with null item */ /* try with null item */
edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, (LPARAM)NULL); edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, 0);
ok(!IsWindow(edit), "Expected valid handle\n"); ok(!IsWindow(edit), "Expected valid handle\n");
/* trigger edit */ /* trigger edit */
@ -934,14 +934,14 @@ static void test_itemedit(void)
r = SendMessage(hTree, TVM_GETITEMSTATE, (WPARAM)hRoot, TVIS_SELECTED); r = SendMessage(hTree, TVM_GETITEMSTATE, (WPARAM)hRoot, TVIS_SELECTED);
expect(0, r); expect(0, r);
/* try to cancel with wrong edit handle */ /* try to cancel with wrong edit handle */
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)NULL); r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0);
expect(0, r); expect(0, r);
ok(IsWindow(edit), "Expected edit control to be valid\n"); ok(IsWindow(edit), "Expected edit control to be valid\n");
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit); r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
expect(0, r); expect(0, r);
ok(!IsWindow(edit), "Expected edit control to be destroyed\n"); ok(!IsWindow(edit), "Expected edit control to be destroyed\n");
/* try to cancel without creating edit */ /* try to cancel without creating edit */
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)NULL); r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0);
expect(0, r); expect(0, r);
/* try to cancel with wrong (not null) handle */ /* try to cancel with wrong (not null) handle */