[PATCH] comctl32/tests: Test more return values (Clang)
Nikolay Sivov
nsivov at codeweavers.com
Wed Nov 11 15:46:49 CST 2015
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/comctl32/tests/listview.c | 15 +++++++++++++++
dlls/comctl32/tests/status.c | 1 +
dlls/comctl32/tests/toolbar.c | 2 --
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 676dca1..acfcd20 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -5342,6 +5342,7 @@ static void test_header_notification2(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ITEMCHANGINGW;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
parent_header_notify_seq[0].id = HDN_ITEMCHANGINGA;
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
"header notify, parent", TRUE);
@@ -5350,6 +5351,7 @@ static void test_header_notification2(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ITEMCHANGEDW;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
parent_header_notify_seq[0].id = HDN_ITEMCHANGEDA;
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
"header notify, parent", TRUE);
@@ -5360,30 +5362,35 @@ static void test_header_notification2(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ITEMCLICKW;
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,
"header notify, parent", FALSE);
ok(nmhdr.hdr.code == HDN_ITEMCLICKA, "Expected ANSI notification code\n");
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ITEMDBLCLICKW;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"header notify, parent", FALSE);
ok(nmhdr.hdr.code == HDN_ITEMDBLCLICKW, "Expected Unicode notification code\n");
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_DIVIDERDBLCLICKW;
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,
"header notify, parent", TRUE);
ok(nmhdr.hdr.code == HDN_DIVIDERDBLCLICKA, "Expected ANSI notification code\n");
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_BEGINTRACKW;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"header notify, parent", FALSE);
ok(nmhdr.hdr.code == HDN_BEGINTRACKW, "Expected Unicode notification code\n");
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ENDTRACKW;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
parent_header_notify_seq[0].id = HDN_ENDTRACKA;
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
"header notify, parent", FALSE);
@@ -5391,6 +5398,7 @@ static void test_header_notification2(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_TRACKW;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
parent_header_notify_seq[0].id = HDN_TRACKA;
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
"header notify, parent", FALSE);
@@ -5398,17 +5406,20 @@ static void test_header_notification2(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_BEGINDRAG;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 1, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"header notify, parent", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ENDDRAG;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
parent_header_notify_seq[0].id = HDN_ENDDRAG;
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_header_notify_seq,
"header notify, parent", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_FILTERCHANGE;
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].flags |= optional; /* NT4 does not send this message */
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);
nmhdr.hdr.code = HDN_BEGINFILTEREDIT;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"header notify, parent", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ENDFILTEREDIT;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"header notify, parent", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ITEMSTATEICONCLICK;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"header notify, parent", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nmhdr.hdr.code = HDN_ITEMKEYDOWN;
ret = SendMessageW(list, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+ ok(ret == 0, "got %d\n", ret);
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
"header notify, parent", FALSE);
diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c
index f3156e9..f537fe0 100644
--- a/dlls/comctl32/tests/status.c
+++ b/dlls/comctl32/tests/status.c
@@ -344,6 +344,7 @@ static void test_status_control(void)
r = SendMessageA(hWndStatus, SB_SETTEXTA, 0, (LPARAM)chstr);
expect(TRUE,r);
r = SendMessageA(hWndStatus, SB_GETTEXTA, 0, (LPARAM)charArray);
+ ok(r == strlen(charArray), "got %d\n", r);
/* substitution with single space */
if (ch > 0x00 && ch < 0x20 && ch != '\t')
chstr[5] = ' ';
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index 23eb250..bab746b 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -1536,7 +1536,6 @@ static void test_sizes(void)
/* Single non-BTNS_AUTOSIZE button with string with TBSTYLE_EX_MIXEDBUTTONS set. */
rebuild_toolbar(&hToolbar);
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_SETBUTTONSIZE, 0, MAKELPARAM(40, 20)) == 1, "TB_SETBUTTONSIZE failed\n");
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. */
rebuild_toolbar(&hToolbar);
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_SETBUTTONSIZE, 0, MAKELPARAM(40, 20)) == 1, "TB_SETBUTTONSIZE failed\n");
SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 );
--
2.6.2
More information about the wine-patches
mailing list