comctl32/tests: Test more return values (Clang).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c4b894db63
commit
1b5aaa1639
|
@ -5342,6 +5342,7 @@ static void test_header_notification2(void)
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ITEMCHANGINGW;
|
nmhdr.hdr.code = HDN_ITEMCHANGINGW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
parent_header_notify_seq[0].id = HDN_ITEMCHANGINGA;
|
parent_header_notify_seq[0].id = HDN_ITEMCHANGINGA;
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
||||||
"header notify, parent", TRUE);
|
"header notify, parent", TRUE);
|
||||||
|
@ -5350,6 +5351,7 @@ static void test_header_notification2(void)
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ITEMCHANGEDW;
|
nmhdr.hdr.code = HDN_ITEMCHANGEDW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
parent_header_notify_seq[0].id = HDN_ITEMCHANGEDA;
|
parent_header_notify_seq[0].id = HDN_ITEMCHANGEDA;
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
||||||
"header notify, parent", TRUE);
|
"header notify, parent", TRUE);
|
||||||
|
@ -5360,30 +5362,35 @@ static void test_header_notification2(void)
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ITEMCLICKW;
|
nmhdr.hdr.code = HDN_ITEMCLICKW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_click_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_click_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
ok(nmhdr.hdr.code == HDN_ITEMCLICKA, "Expected ANSI notification code\n");
|
ok(nmhdr.hdr.code == HDN_ITEMCLICKA, "Expected ANSI notification code\n");
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ITEMDBLCLICKW;
|
nmhdr.hdr.code = HDN_ITEMDBLCLICKW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
ok(nmhdr.hdr.code == HDN_ITEMDBLCLICKW, "Expected Unicode notification code\n");
|
ok(nmhdr.hdr.code == HDN_ITEMDBLCLICKW, "Expected Unicode notification code\n");
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_DIVIDERDBLCLICKW;
|
nmhdr.hdr.code = HDN_DIVIDERDBLCLICKW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_divider_dclick_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_divider_dclick_seq,
|
||||||
"header notify, parent", TRUE);
|
"header notify, parent", TRUE);
|
||||||
ok(nmhdr.hdr.code == HDN_DIVIDERDBLCLICKA, "Expected ANSI notification code\n");
|
ok(nmhdr.hdr.code == HDN_DIVIDERDBLCLICKA, "Expected ANSI notification code\n");
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_BEGINTRACKW;
|
nmhdr.hdr.code = HDN_BEGINTRACKW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
ok(nmhdr.hdr.code == HDN_BEGINTRACKW, "Expected Unicode notification code\n");
|
ok(nmhdr.hdr.code == HDN_BEGINTRACKW, "Expected Unicode notification code\n");
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ENDTRACKW;
|
nmhdr.hdr.code = HDN_ENDTRACKW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
parent_header_notify_seq[0].id = HDN_ENDTRACKA;
|
parent_header_notify_seq[0].id = HDN_ENDTRACKA;
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
|
@ -5391,6 +5398,7 @@ static void test_header_notification2(void)
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_TRACKW;
|
nmhdr.hdr.code = HDN_TRACKW;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
parent_header_notify_seq[0].id = HDN_TRACKA;
|
parent_header_notify_seq[0].id = HDN_TRACKA;
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
|
@ -5398,17 +5406,20 @@ static void test_header_notification2(void)
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_BEGINDRAG;
|
nmhdr.hdr.code = HDN_BEGINDRAG;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 1, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ENDDRAG;
|
nmhdr.hdr.code = HDN_ENDDRAG;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
parent_header_notify_seq[0].id = HDN_ENDDRAG;
|
parent_header_notify_seq[0].id = HDN_ENDDRAG;
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_FILTERCHANGE;
|
nmhdr.hdr.code = HDN_FILTERCHANGE;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
parent_header_notify_seq[0].id = HDN_FILTERCHANGE;
|
parent_header_notify_seq[0].id = HDN_FILTERCHANGE;
|
||||||
parent_header_notify_seq[0].flags |= optional; /* NT4 does not send this message */
|
parent_header_notify_seq[0].flags |= optional; /* NT4 does not send this message */
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
|
||||||
|
@ -5417,21 +5428,25 @@ static void test_header_notification2(void)
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_BEGINFILTEREDIT;
|
nmhdr.hdr.code = HDN_BEGINFILTEREDIT;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ENDFILTEREDIT;
|
nmhdr.hdr.code = HDN_ENDFILTEREDIT;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ITEMSTATEICONCLICK;
|
nmhdr.hdr.code = HDN_ITEMSTATEICONCLICK;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||||
nmhdr.hdr.code = HDN_ITEMKEYDOWN;
|
nmhdr.hdr.code = HDN_ITEMKEYDOWN;
|
||||||
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
|
||||||
|
ok(ret == 0, "got %d\n", ret);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||||
"header notify, parent", FALSE);
|
"header notify, parent", FALSE);
|
||||||
|
|
||||||
|
|
|
@ -344,6 +344,7 @@ static void test_status_control(void)
|
||||||
r = SendMessageA(hWndStatus, SB_SETTEXTA, 0, (LPARAM)chstr);
|
r = SendMessageA(hWndStatus, SB_SETTEXTA, 0, (LPARAM)chstr);
|
||||||
expect(TRUE,r);
|
expect(TRUE,r);
|
||||||
r = SendMessageA(hWndStatus, SB_GETTEXTA, 0, (LPARAM)charArray);
|
r = SendMessageA(hWndStatus, SB_GETTEXTA, 0, (LPARAM)charArray);
|
||||||
|
ok(r == strlen(charArray), "got %d\n", r);
|
||||||
/* substitution with single space */
|
/* substitution with single space */
|
||||||
if (ch > 0x00 && ch < 0x20 && ch != '\t')
|
if (ch > 0x00 && ch < 0x20 && ch != '\t')
|
||||||
chstr[5] = ' ';
|
chstr[5] = ' ';
|
||||||
|
|
|
@ -1536,7 +1536,6 @@ static void test_sizes(void)
|
||||||
/* Single non-BTNS_AUTOSIZE button with string with TBSTYLE_EX_MIXEDBUTTONS set. */
|
/* Single non-BTNS_AUTOSIZE button with string with TBSTYLE_EX_MIXEDBUTTONS set. */
|
||||||
rebuild_toolbar(&hToolbar);
|
rebuild_toolbar(&hToolbar);
|
||||||
SendMessageA(hToolbar, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_MIXEDBUTTONS);
|
SendMessageA(hToolbar, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_MIXEDBUTTONS);
|
||||||
style = SendMessageA(hToolbar, TB_GETSTYLE, 0, 0);
|
|
||||||
ok(SendMessageA(hToolbar, TB_ADDBUTTONSA, 1, (LPARAM)&buttons4[1]) == 1, "TB_ADDBUTTONSA failed\n");
|
ok(SendMessageA(hToolbar, TB_ADDBUTTONSA, 1, (LPARAM)&buttons4[1]) == 1, "TB_ADDBUTTONSA failed\n");
|
||||||
ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(40, 20)) == 1, "TB_SETBUTTONSIZE failed\n");
|
ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(40, 20)) == 1, "TB_SETBUTTONSIZE failed\n");
|
||||||
SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 );
|
SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 );
|
||||||
|
@ -1545,7 +1544,6 @@ static void test_sizes(void)
|
||||||
/* Single non-BTNS_AUTOSIZE, BTNS_SHOWTEXT button with string with TBSTYLE_EX_MIXEDBUTTONS set. */
|
/* Single non-BTNS_AUTOSIZE, BTNS_SHOWTEXT button with string with TBSTYLE_EX_MIXEDBUTTONS set. */
|
||||||
rebuild_toolbar(&hToolbar);
|
rebuild_toolbar(&hToolbar);
|
||||||
SendMessageA(hToolbar, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_MIXEDBUTTONS);
|
SendMessageA(hToolbar, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_MIXEDBUTTONS);
|
||||||
style = SendMessageA(hToolbar, TB_GETSTYLE, 0, 0);
|
|
||||||
ok(SendMessageA(hToolbar, TB_ADDBUTTONSA, 1, (LPARAM)&buttons4[2]) == 1, "TB_ADDBUTTONSA failed\n");
|
ok(SendMessageA(hToolbar, TB_ADDBUTTONSA, 1, (LPARAM)&buttons4[2]) == 1, "TB_ADDBUTTONSA failed\n");
|
||||||
ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(40, 20)) == 1, "TB_SETBUTTONSIZE failed\n");
|
ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(40, 20)) == 1, "TB_SETBUTTONSIZE failed\n");
|
||||||
SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 );
|
SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 );
|
||||||
|
|
Loading…
Reference in New Issue