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
4c6803d8
Commit
4c6803d8
authored
Jun 07, 2012
by
Daniel Jelinski
Committed by
Alexandre Julliard
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Treeview shouldn't modify cChildren if it was explicitly set.
parent
1196aed3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
treeview.c
dlls/comctl32/tests/treeview.c
+50
-0
No files found.
dlls/comctl32/tests/treeview.c
View file @
4c6803d8
...
...
@@ -1602,6 +1602,55 @@ static void test_delete_items(void)
DestroyWindow
(
hTree
);
}
static
void
test_cchildren
(
void
)
{
HWND
hTree
;
INT
ret
;
TVITEMA
item
;
hTree
=
create_treeview_control
(
0
);
fill_tree
(
hTree
);
ret
=
SendMessage
(
hTree
,
TVM_DELETEITEM
,
0
,
(
LPARAM
)
hChild
);
expect
(
TRUE
,
ret
);
/* check cChildren - automatic mode */
item
.
hItem
=
hRoot
;
item
.
mask
=
TVIF_CHILDREN
;
ret
=
SendMessageA
(
hTree
,
TVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
ret
);
expect
(
0
,
item
.
cChildren
);
DestroyWindow
(
hTree
);
/* start over */
hTree
=
create_treeview_control
(
0
);
fill_tree
(
hTree
);
/* turn off automatic mode by setting cChildren explicitly */
item
.
hItem
=
hRoot
;
item
.
mask
=
TVIF_CHILDREN
;
ret
=
SendMessageA
(
hTree
,
TVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
ret
);
expect
(
1
,
item
.
cChildren
);
ret
=
SendMessageA
(
hTree
,
TVM_SETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
ret
);
ret
=
SendMessage
(
hTree
,
TVM_DELETEITEM
,
0
,
(
LPARAM
)
hChild
);
expect
(
TRUE
,
ret
);
/* check cChildren */
ret
=
SendMessageA
(
hTree
,
TVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
ret
);
todo_wine
expect
(
1
,
item
.
cChildren
);
DestroyWindow
(
hTree
);
}
struct
_ITEM_DATA
{
HTREEITEM
parent
;
/* for root value of parent field is unidetified */
...
...
@@ -1908,6 +1957,7 @@ START_TEST(treeview)
test_TVS_SINGLEEXPAND
();
test_WM_PAINT
();
test_delete_items
();
test_cchildren
();
test_htreeitem_layout
();
test_TVS_CHECKBOXES
();
test_TVM_GETNEXTITEM
();
...
...
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