-- v14: comctl32/listview: Add LVM_GETNEXTITEM test.
From: Ilia Docin ilya.docin@contentai.ru
--- dlls/comctl32/tests/listview.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 920c2c1c351..0f77168c336 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -7234,6 +7234,36 @@ static void test_LVM_SETBKIMAGE(BOOL is_v6) CoUninitialize(); }
+static void test_LVM_GETNEXTITEM(void) +{ + /* LVM_GETNEXTITEM */ + + HWND hwnd; + DWORD r; + UINT uFlagsAbove = MAKELPARAM(LVNI_ABOVE, 0); + UINT uFlagsBelow = MAKELPARAM(LVNI_BELOW, 0); + + hwnd = create_listview_control(LVS_REPORT); + insert_item(hwnd, 0); + insert_item(hwnd, 1); + insert_item(hwnd, 2); + + r = SendMessageA(hwnd, LVM_GETNEXTITEM, 0, uFlagsAbove); + expect(-1, r); + r = SendMessageA(hwnd, LVM_GETNEXTITEM, 0, uFlagsBelow); + expect(1, r); + r = SendMessageA(hwnd, LVM_GETNEXTITEM, 1, uFlagsAbove); + expect(0, r); + r = SendMessageA(hwnd, LVM_GETNEXTITEM, 1, uFlagsBelow); + expect(2, r); + r = SendMessageA(hwnd, LVM_GETNEXTITEM, 2, uFlagsAbove); + expect(1, r); + r = SendMessageA(hwnd, LVM_GETNEXTITEM, 2, uFlagsBelow); + todo_wine expect(-1, r); + + DestroyWindow(hwnd); +} + START_TEST(listview) { ULONG_PTR ctx_cookie; @@ -7348,6 +7378,7 @@ START_TEST(listview) test_item_state_change(); test_selected_column(); test_LVM_GETNEXTITEMINDEX(); + test_LVM_GETNEXTITEM(); test_LVM_SETBKIMAGE(TRUE);
unload_v6_module(ctx_cookie, hCtx);
On Sat Aug 10 04:02:40 2024 +0000, Zhiyi Zhang wrote:
You should add the tests and mark the tests that are failing on wine with todo_wine. Then in the next patch that fixes the bug, remove those todo_wines.
Ok, done.
Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/tests/listview.c:
CoUninitialize();
}
Please rename the patch subject to "comctl32/tests: Add LVM_GETNEXTITEM test."
Also, the patch for the fix is lost. Only the tests are pushed to this MR.