Paul Vriens : comctl32/tests: Fix some test failures with comctl32 < 5.80.
Alexandre Julliard
julliard at winehq.org
Fri Jun 26 09:47:08 CDT 2009
Module: wine
Branch: master
Commit: 2bcf38d3a33d2d8845a0e760ab3e2a5afdfa5046
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2bcf38d3a33d2d8845a0e760ab3e2a5afdfa5046
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Thu Jun 25 20:35:32 2009 +0200
comctl32/tests: Fix some test failures with comctl32 < 5.80.
---
dlls/comctl32/tests/toolbar.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index 1946095..9827b14 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -415,7 +415,7 @@ static void test_add_bitmap(void)
ok(strcmp(_buf, (tab)[_i]) == 0, "Invalid string #%d - '%s' vs '%s'\n", _i, (tab)[_i], _buf); \
} \
ok(SendMessageA(hToolbar, TB_GETSTRING, MAKEWPARAM(260, (count)), (LPARAM)_buf) == -1, \
- "Too many string in table\n"); \
+ "Too many strings in table\n"); \
}
static void test_add_string(void)
@@ -432,10 +432,17 @@ static void test_add_string(void)
HWND hToolbar = NULL;
TBBUTTON button;
int ret;
+ CHAR buf[260];
rebuild_toolbar(&hToolbar);
ret = SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)test1);
ok(ret == 0, "TB_ADDSTRINGA - unexpected return %d\n", ret);
+ ret = SendMessageA(hToolbar, TB_GETSTRING, MAKEWPARAM(260, 1), (LPARAM)buf);
+ if (ret == 0)
+ {
+ win_skip("TB_GETSTRING needs 5.80\n");
+ return;
+ }
CHECK_STRING_TABLE(2, ret1);
ret = SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)test2);
ok(ret == 2, "TB_ADDSTRINGA - unexpected return %d\n", ret);
@@ -1281,6 +1288,12 @@ static void test_getstring(void)
ok(hToolbar != NULL, "Toolbar creation problem\n");
r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), 0);
+ if (r == 0)
+ {
+ win_skip("TB_GETSTRING and TB_GETSTRINGW need 5.80\n");
+ DestroyWindow(hToolbar);
+ return;
+ }
expect(-1, r);
r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), 0);
expect(-1, r);
More information about the wine-cvs
mailing list