[3/4] comctl32/listview: A bunch of LVM_GETSUBITEMRECT tests

Nikolay Sivov bunglehead at gmail.com
Fri May 29 05:04:36 CDT 2009


Changelog:
   - A bunch of LVM_GETSUBITEMRECT tests

>From fe55460c641e1806e0d08263e0eee20f4ff0e6f6 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Fri, 29 May 2009 00:58:10 +0400
Subject: A bunch of LVM_GETSUBITEMRECT tests

---
 dlls/comctl32/tests/listview.c |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 4c4022d..003f98f 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -1827,6 +1827,41 @@ todo_wine
 todo_wine
     expect(3, rect.top);
 
+    /* item LVS_REPORT padding isn't applied to subitems */
+    insert_item(hwnd, 0);
+
+    rect.left = LVIR_BOUNDS;
+    rect.top  = 1;
+    rect.right = rect.bottom = 0;
+    r = SendMessage(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect);
+    ok(r != 0, "Expected not-null LRESULT\n");
+todo_wine {
+    expect(100, rect.left);
+    expect(250, rect.right);
+}
+
+    rect.left = LVIR_ICON;
+    rect.top  = 1;
+    rect.right = rect.bottom = 0;
+    r = SendMessage(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect);
+    ok(r != 0, "Expected not-null LRESULT\n");
+    /* no icon attached - zero width rectangle */
+todo_wine {
+    expect(100, rect.left);
+    expect(100, rect.right);
+}
+
+    rect.left = LVIR_LABEL;
+    rect.top  = 1;
+    rect.right = rect.bottom = 0;
+    r = SendMessage(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect);
+    ok(r != 0, "Expected not-null LRESULT\n");
+    /* should equal to LVIR_BOUNDS */
+todo_wine {
+    expect(100, rect.left);
+    expect(250, rect.right);
+}
+
     DestroyWindow(hwnd);
 
     /* try it for non LVS_REPORT style */
-- 
1.5.6.5







More information about the wine-patches mailing list