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
297a7349
Commit
297a7349
authored
Jul 19, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Use nameless unions/structs.
parent
573e20e9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
93 deletions
+93
-93
propsheet.c
dlls/comctl32/tests/propsheet.c
+44
-44
treeview.c
dlls/comctl32/tests/treeview.c
+49
-49
No files found.
dlls/comctl32/tests/propsheet.c
View file @
297a7349
This diff is collapsed.
Click to expand it.
dlls/comctl32/tests/treeview.c
View file @
297a7349
...
...
@@ -485,14 +485,14 @@ static void fill_tree(HWND hTree)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
root
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
root
;
hRoot
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
child
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
child
;
hChild
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
}
...
...
@@ -544,8 +544,8 @@ static void test_callback(void)
expect
(
TRUE
,
ret
);
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
LPSTR_TEXTCALLBACKA
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
LPSTR_TEXTCALLBACKA
;
hRoot
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hRoot
!=
NULL
,
"failed to set root
\n
"
);
...
...
@@ -560,8 +560,8 @@ static void test_callback(void)
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
test_string
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
test_string
;
hItem1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem1
!=
NULL
,
"failed to set Item1
\n
"
);
...
...
@@ -581,7 +581,7 @@ static void test_callback(void)
ok
(
strcmp
(
tvi
.
pszText
,
TEST_CALLBACK_TEXT
)
==
0
,
"Item text mismatch %s vs %s
\n
"
,
tvi
.
pszText
,
TEST_CALLBACK_TEXT
);
U
(
ins
)
.
item
.
pszText
=
NULL
;
ins
.
item
.
pszText
=
NULL
;
hItem2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem2
!=
NULL
,
"failed to set Item2
\n
"
);
tvi
.
hItem
=
hItem2
;
...
...
@@ -741,9 +741,9 @@ static void test_getitemtext(void)
/* add an item without TVIF_TEXT mask and pszText == NULL */
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
0
;
U
(
ins
)
.
item
.
pszText
=
NULL
;
U
(
ins
)
.
item
.
cchTextMax
=
0
;
ins
.
item
.
mask
=
0
;
ins
.
item
.
pszText
=
NULL
;
ins
.
item
.
cchTextMax
=
0
;
hChild
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hChild
!=
NULL
,
"failed to set hChild
\n
"
);
...
...
@@ -782,13 +782,13 @@ static void test_focus(void)
*/
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
hChild
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
child1
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
child1
;
hChild1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hChild1
!=
NULL
,
"failed to set hChild1
\n
"
);
ins
.
hInsertAfter
=
hChild1
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
child2
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
child2
;
hChild2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hChild2
!=
NULL
,
"failed to set hChild2
\n
"
);
...
...
@@ -1510,28 +1510,28 @@ static void test_expandinvisible(void)
ok
(
ret
==
TRUE
,
"ret
\n
"
);
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
nodeText
[
0
];
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
nodeText
[
0
];
node
[
0
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
0
]
!=
NULL
,
"failed to set node[0]
\n
"
);
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
hParent
=
node
[
0
];
U
(
ins
)
.
item
.
pszText
=
nodeText
[
1
];
ins
.
item
.
pszText
=
nodeText
[
1
];
node
[
1
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
1
]
!=
NULL
,
"failed to set node[1]
\n
"
);
U
(
ins
)
.
item
.
pszText
=
nodeText
[
4
];
ins
.
item
.
pszText
=
nodeText
[
4
];
node
[
4
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
4
]
!=
NULL
,
"failed to set node[4]
\n
"
);
ins
.
hParent
=
node
[
1
];
U
(
ins
)
.
item
.
pszText
=
nodeText
[
2
];
ins
.
item
.
pszText
=
nodeText
[
2
];
node
[
2
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
2
]
!=
NULL
,
"failed to set node[2]
\n
"
);
U
(
ins
)
.
item
.
pszText
=
nodeText
[
3
];
ins
.
item
.
pszText
=
nodeText
[
3
];
node
[
3
]
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
node
[
3
]
!=
NULL
,
"failed to set node[3]
\n
"
);
...
...
@@ -1579,7 +1579,7 @@ static void test_expand(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
mask
=
0
;
ins
.
item
.
mask
=
0
;
first
=
TreeView_InsertItemA
(
tv
,
&
ins
);
ok
(
first
!=
NULL
,
"failed to insert first node
\n
"
);
second
=
TreeView_InsertItemA
(
tv
,
&
ins
);
...
...
@@ -2111,8 +2111,8 @@ static void test_TVS_SINGLEEXPAND(void)
{
ins
.
hParent
=
items
[
i
].
parent
?
*
items
[
i
].
parent
:
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
foo
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
foo
;
*
items
[
i
].
handle
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
}
...
...
@@ -2282,15 +2282,15 @@ static void test_delete_items(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
item1
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
item1
;
hItem1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem1
!=
NULL
,
"InsertItem failed
\n
"
);
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
hItem1
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
item2
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
item2
;
hItem2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
ok
(
hItem2
!=
NULL
,
"InsertItem failed
\n
"
);
...
...
@@ -2429,14 +2429,14 @@ static void test_htreeitem_layout(BOOL is_version_6)
ins
.
hParent
=
hChild
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
0
;
ins
.
item
.
mask
=
0
;
item1
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
CHECK_ITEM
(
hTree
,
item1
);
ins
.
hParent
=
hRoot
;
ins
.
hInsertAfter
=
TVI_FIRST
;
U
(
ins
)
.
item
.
mask
=
0
;
ins
.
item
.
mask
=
0
;
item2
=
TreeView_InsertItemA
(
hTree
,
&
ins
);
CHECK_ITEM
(
hTree
,
item2
);
...
...
@@ -2760,8 +2760,8 @@ static void test_WM_KEYDOWN(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
rootA
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
(
char
*
)
rootA
;
hRoot
=
TreeView_InsertItemA
(
hwnd
,
&
ins
);
ok
(
hRoot
!=
NULL
,
"got %p
\n
"
,
hRoot
);
...
...
@@ -2841,31 +2841,31 @@ static void fill_treeview_sort_test(HWND hwnd)
/* root, two children, with two children each */
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
root
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
children
[
0
]
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
children
[
1
]
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
children
[
0
];
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
children
[
1
];
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
ins
.
item
.
pszText
=
(
char
*
)
itemnames
[
i
++
];
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
}
...
...
@@ -2891,8 +2891,8 @@ static void test_TVM_SORTCHILDREN(void)
/* add only root, sort from it */
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"root"
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
(
char
*
)
"root"
;
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ok
(
root
!=
NULL
,
"Expected root node
\n
"
);
...
...
@@ -2962,19 +2962,19 @@ static void test_TVM_SORTCHILDREN(void)
ins
.
hParent
=
TVI_ROOT
;
ins
.
hInsertAfter
=
TVI_ROOT
;
U
(
ins
)
.
item
.
mask
=
TVIF_TEXT
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"root"
;
ins
.
item
.
mask
=
TVIF_TEXT
;
ins
.
item
.
pszText
=
(
char
*
)
"root"
;
root
=
(
HTREEITEM
)
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ok
(
root
!=
NULL
,
"Expected root node
\n
"
);
ins
.
hParent
=
root
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"I1"
;
ins
.
item
.
pszText
=
(
char
*
)
"I1"
;
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ins
.
hParent
=
root
;
ins
.
hInsertAfter
=
TVI_LAST
;
U
(
ins
)
.
item
.
pszText
=
(
char
*
)
"i1"
;
ins
.
item
.
pszText
=
(
char
*
)
"i1"
;
SendMessageA
(
hwnd
,
TVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
ins
);
ret
=
SendMessageA
(
hwnd
,
TVM_SORTCHILDREN
,
TRUE
,
(
LPARAM
)
root
);
...
...
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