Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
31b894d0
Commit
31b894d0
authored
Feb 02, 2005
by
Lauri Tulmin
Committed by
Alexandre Julliard
Feb 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for LB_SELITEMRANGE and make it pass.
parent
26c92d72
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
listbox.c
dlls/user/listbox.c
+0
-3
listbox.c
dlls/user/tests/listbox.c
+26
-8
No files found.
dlls/user/listbox.c
View file @
31b894d0
...
...
@@ -1365,8 +1365,6 @@ static LRESULT LISTBOX_SelectItemRange( LB_DESCR *descr, INT first,
if
(
last
==
-
1
)
last
=
descr
->
nb_items
-
1
;
if
((
first
<
0
)
||
(
first
>=
descr
->
nb_items
))
return
LB_ERR
;
if
((
last
<
0
)
||
(
last
>=
descr
->
nb_items
))
return
LB_ERR
;
/* selected_item reflects last selected/unselected item on multiple sel */
descr
->
selected_item
=
last
;
if
(
on
)
/* Turn selection on */
{
...
...
@@ -1376,7 +1374,6 @@ static LRESULT LISTBOX_SelectItemRange( LB_DESCR *descr, INT first,
descr
->
items
[
i
].
selected
=
TRUE
;
LISTBOX_InvalidateItemRect
(
descr
,
i
);
}
LISTBOX_SetCaretIndex
(
descr
,
last
,
TRUE
);
}
else
/* Turn selection off */
{
...
...
dlls/user/tests/listbox.c
View file @
31b894d0
...
...
@@ -64,6 +64,7 @@ struct listbox_test {
struct
listbox_stat
init
,
init_todo
;
struct
listbox_stat
click
,
click_todo
;
struct
listbox_stat
step
,
step_todo
;
struct
listbox_stat
sel
,
sel_todo
;
};
void
...
...
@@ -133,6 +134,13 @@ check (const struct listbox_test test)
listbox_query
(
hLB
,
&
answer
);
listbox_ok
(
test
,
step
,
answer
);
DestroyWindow
(
hLB
);
hLB
=
create_listbox
(
test
.
prop
.
add_style
);
SendMessage
(
hLB
,
LB_SELITEMRANGE
,
TRUE
,
MAKELPARAM
(
1
,
2
));
listbox_query
(
hLB
,
&
answer
);
listbox_ok
(
test
,
sel
,
answer
);
WAIT
;
DestroyWindow
(
hLB
);
}
...
...
@@ -155,6 +163,8 @@ void check_item_height()
itemHeight
=
SendMessageW
(
hLB
,
LB_GETITEMHEIGHT
,
0
,
0
);
ok
(
itemHeight
==
tm
.
tmHeight
,
"Item height wrong, got %d, expecting %ld
\n
"
,
itemHeight
,
tm
.
tmHeight
);
DestroyWindow
(
hLB
);
}
START_TEST
(
listbox
)
...
...
@@ -164,43 +174,51 @@ START_TEST(listbox)
{{
0
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
/* {selected, anchor, caret, selcount}{TODO fields} */
const
struct
listbox_test
SS_NS
=
{{
LBS_NOSEL
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
MS
=
{{
LBS_MULTIPLESEL
},
{
0
,
LB_ERR
,
0
,
0
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
1
},
{
0
,
0
,
0
,
0
},
{
2
,
1
,
2
,
1
},
{
0
,
0
,
0
,
0
}};
{
2
,
1
,
2
,
1
},
{
0
,
0
,
0
,
0
},
{
0
,
LB_ERR
,
0
,
2
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
MS_NS
=
{{
LBS_MULTIPLESEL
|
LBS_NOSEL
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
ES
=
{{
LBS_EXTENDEDSEL
},
{
0
,
LB_ERR
,
0
,
0
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
1
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
1
},
{
0
,
0
,
0
,
0
}};
{
2
,
2
,
2
,
1
},
{
0
,
0
,
0
,
0
},
{
0
,
LB_ERR
,
0
,
2
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
ES_NS
=
{{
LBS_EXTENDEDSEL
|
LBS_NOSEL
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
EMS
=
{{
LBS_EXTENDEDSEL
|
LBS_MULTIPLESEL
},
{
0
,
LB_ERR
,
0
,
0
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
1
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
1
},
{
0
,
0
,
0
,
0
}};
{
2
,
2
,
2
,
1
},
{
0
,
0
,
0
,
0
},
{
0
,
LB_ERR
,
0
,
2
},
{
0
,
0
,
0
,
0
}};
const
struct
listbox_test
EMS_NS
=
{{
LBS_EXTENDEDSEL
|
LBS_MULTIPLESEL
|
LBS_NOSEL
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
1
,
1
,
1
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
{
2
,
2
,
2
,
LB_ERR
},
{
0
,
0
,
0
,
0
},
{
LB_ERR
,
LB_ERR
,
0
,
LB_ERR
},
{
0
,
0
,
0
,
0
}};
trace
(
" Testing single selection...
\n
"
);
check
(
SS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment