Nikolay Sivov : comctl32/listview: Basic LVM_MAPINDEXTOID tests.
Alexandre Julliard
julliard at winehq.org
Mon Jun 22 09:04:15 CDT 2009
Module: wine
Branch: master
Commit: 2286a321c24ba88dcf2574b281fc7b2c80dbc409
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2286a321c24ba88dcf2574b281fc7b2c80dbc409
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Sat Jun 20 14:56:55 2009 +0400
comctl32/listview: Basic LVM_MAPINDEXTOID tests.
---
dlls/comctl32/tests/listview.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 7d14294..de899f5 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -3583,6 +3583,33 @@ static void test_canceleditlabel(void)
DestroyWindow(hwnd);
}
+static void test_mapidindex(void)
+{
+ HWND hwnd;
+ DWORD ret;
+
+ hwnd = create_listview_control(0);
+ ok(hwnd != NULL, "failed to create a listview window\n");
+
+ insert_item(hwnd, 0);
+ insert_item(hwnd, 1);
+
+ ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0);
+ expect(0, ret);
+ ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0);
+ todo_wine expect(1, ret);
+ /* remove 0 indexed item, id retained */
+ SendMessage(hwnd, LVM_DELETEITEM, 0, 0);
+ ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0);
+ todo_wine expect(1, ret);
+ /* new id starts from previous value */
+ insert_item(hwnd, 1);
+ ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0);
+ todo_wine expect(2, ret);
+
+ DestroyWindow(hwnd);
+}
+
START_TEST(listview)
{
HMODULE hComctl32;
@@ -3648,6 +3675,7 @@ START_TEST(listview)
/* comctl32 version 6 tests start here */
test_get_set_view();
test_canceleditlabel();
+ test_mapidindex();
unload_v6_module(ctx_cookie);
More information about the wine-cvs
mailing list