James Hawkins : comctl32: Explicity set the number of tics before testing tic placement.
Alexandre Julliard
julliard at winehq.org
Mon Jul 14 05:57:01 CDT 2008
Module: wine
Branch: master
Commit: 83004cdd1e2197e42f14b4409720fe4300b094b7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=83004cdd1e2197e42f14b4409720fe4300b094b7
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Fri Jul 11 19:37:21 2008 -0500
comctl32: Explicity set the number of tics before testing tic placement.
---
dlls/comctl32/tests/trackbar.c | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c
index 13f56fd..41f866e 100644
--- a/dlls/comctl32/tests/trackbar.c
+++ b/dlls/comctl32/tests/trackbar.c
@@ -331,10 +331,10 @@ static const struct message parent_thumb_length_test_seq[] = {
static const struct message tic_placement_test_seq[] = {
{ TBM_GETPTICS, sent},
{ TBM_GETTIC, sent|wparam, 0},
+ { TBM_GETTIC, sent|wparam, 2},
{ TBM_GETTIC, sent|wparam, 4},
- { TBM_GETTIC, sent|wparam, 11},
{ TBM_GETTICPOS, sent|wparam, 0},
- { TBM_GETTICPOS, sent|wparam, 4},
+ { TBM_GETTICPOS, sent|wparam, 2},
{0}
};
@@ -799,34 +799,37 @@ static void test_tic_settings(HWND hWndTrackbar){
static void test_tic_placement(HWND hWndTrackbar){
int r;
DWORD *rPTics;
+ DWORD numtics;
+
+ SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(1, 6));
+ SendMessage(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
+
+ numtics = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
+ ok(numtics == 6, "Expected 6, got %d\n", numtics);
flush_sequences(sequences, NUM_MSG_SEQUENCE);
/* test TBM_GETPTICS */
rPTics = (DWORD *) SendMessage(hWndTrackbar, TBM_GETPTICS, 0,0);
- todo_wine{
- expect(1, rPTics[0]);
- expect(2, rPTics[1]);
- expect(3, rPTics[2]);
- expect(4, rPTics[3]);
- }
+ expect(2, rPTics[0]);
+ expect(3, rPTics[1]);
+ expect(4, rPTics[2]);
+ expect(5, rPTics[3]);
/* test TBM_GETTIC */
r = SendMessage(hWndTrackbar, TBM_GETTIC, 0,0);
+ expect(2, r);
+ r = SendMessage(hWndTrackbar, TBM_GETTIC, 2,0);
+ expect(4, r);
+ r = SendMessage(hWndTrackbar, TBM_GETTIC, 4,0);
todo_wine{
- expect(1, r);
- r = SendMessage(hWndTrackbar, TBM_GETTIC, 4,0);
- expect(5, r);
+ expect(-1, r);
}
- r = SendMessage(hWndTrackbar, TBM_GETTIC, 11,0);
- expect(-1, r);
/* test TBM_GETTICPIC */
r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 0, 0);
- todo_wine{
- ok(r > 0, "Expected r > 0, got %d\n", r);
- r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 4, 0);
- ok(r > 0, "Expected r > 0, got %d\n", r);
- }
+ ok(r > 0, "Expected r > 0, got %d\n", r);
+ r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 2, 0);
+ ok(r > 0, "Expected r > 0, got %d\n", r);
ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tic_placement_test_seq, "get tic placement test sequence", FALSE);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent get tic placement test sequence", FALSE);
More information about the wine-cvs
mailing list