[3/7] comctl32/listview: Basic LVM_MAPINDEXTOID tests
Nikolay Sivov
bunglehead at gmail.com
Sun Jun 21 17:50:09 CDT 2009
Changelog:
- Basic LVM_MAPINDEXTOID tests
>From a51c8ca0cf79a73a9efe8d8cf4544575bf31454b Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sat, 20 Jun 2009 14:56:55 +0400
Subject: 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 5aa7146..a97a8dc 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);
--
1.5.6.5
More information about the wine-patches
mailing list