user32/tests: Use 'start' and 'end' variables in test comparisons

Hugh McMaster hugh.mcmaster at outlook.com
Thu Dec 17 04:44:23 CST 2015


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 dlls/user32/tests/combo.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c
index 0d22fa5..8d77bdb 100644
--- a/dlls/user32/tests/combo.c
+++ b/dlls/user32/tests/combo.c
@@ -440,7 +440,7 @@ static void test_changesize( DWORD style)
 static void test_editselection(void)
 {
     HWND hCombo;
-    INT start,end;
+    unsigned short start, end;
     HWND hEdit;
     COMBOBOXINFO cbInfo;
     BOOL ret;
@@ -477,15 +477,15 @@ static void test_editselection(void)
     /* Now what is the selection - still empty */
     SendMessageA(hCombo, CB_GETEDITSEL, (WPARAM)&start, (WPARAM)&end);
     len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
-    ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len));
-    ok(HIWORD(len)==0, "Unexpected end position for selection %d\n", HIWORD(len));
+    ok(LOWORD(len)==start, "Unexpected start position for selection; got %u, expected 0\n", LOWORD(len));
+    ok(HIWORD(len)==end, "Unexpected end position for selection; got %u, expected 0\n", HIWORD(len));
 
     /* Give it focus, and it gets selected */
     SendMessageA(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit);
     SendMessageA(hCombo, CB_GETEDITSEL, (WPARAM)&start, (WPARAM)&end);
     len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
-    ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len));
-    ok(HIWORD(len)==6, "Unexpected end position for selection %d\n", HIWORD(len));
+    ok(LOWORD(len)==start, "Unexpected start position for selection; got %u, expected 0\n", LOWORD(len));
+    ok(HIWORD(len)==end, "Unexpected end position for selection; got %u, expected 6\n", HIWORD(len));
 
     /* Now emulate a key press */
     edit[0] = 0x00;
@@ -524,8 +524,8 @@ static void test_editselection(void)
     /* Now what is the selection */
     SendMessageA(hCombo, CB_GETEDITSEL, (WPARAM)&start, (WPARAM)&end);
     len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
-    ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len));
-    ok(HIWORD(len)==6, "Unexpected end position for selection %d\n", HIWORD(len));
+    ok(LOWORD(len)==start, "Unexpected start position for selection; got %u, expected 0\n", LOWORD(len));
+    ok(HIWORD(len)==end, "Unexpected end position for selection; got %u, expected 6\n", HIWORD(len));
 
     /* Now change the selection to the apparently invalid start -1, end -1 and
        show it means no selection (ie start -1) but cursor at end              */
-- 
1.9.1




More information about the wine-patches mailing list