Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b7f18395
Commit
b7f18395
authored
Apr 16, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Simplify static text data initialization.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
025508f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
header.c
dlls/comctl32/tests/header.c
+11
-13
No files found.
dlls/comctl32/tests/header.c
View file @
b7f18395
...
...
@@ -1080,15 +1080,13 @@ static void test_hdm_index_messages(HWND hParent)
HWND
hChild
;
int
retVal
,
i
,
iSize
;
static
const
int
lpiarray
[
2
]
=
{
1
,
0
};
static
int
lpiarrayReceived
[
2
];
static
char
firstHeaderItem
[]
=
"Name"
;
static
char
secondHeaderItem
[]
=
"Size"
;
static
char
thirdHeaderItem
[]
=
"Type"
;
static
char
fourthHeaderItem
[]
=
"Date Modified"
;
static
char
*
items
[]
=
{
firstHeaderItem
,
secondHeaderItem
,
thirdHeaderItem
,
fourthHeaderItem
};
static
const
char
*
item_texts
[]
=
{
"Name"
,
"Size"
,
"Type"
,
"Date Modified"
};
RECT
rect
;
HDITEMA
hdItem
;
char
buffA
[
32
];
int
array
[
2
];
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
hChild
=
create_custom_header_control
(
hParent
,
FALSE
);
...
...
@@ -1099,10 +1097,10 @@ static void test_hdm_index_messages(HWND hParent)
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
add_header_to_parent_seq
,
"adder header control to parent"
,
FALSE
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
for
(
i
=
0
;
i
<
sizeof
(
item
s
)
/
sizeof
(
item
s
[
0
]);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
item
_texts
)
/
sizeof
(
item_text
s
[
0
]);
i
++
)
{
hdItem
.
mask
=
HDI_TEXT
|
HDI_WIDTH
|
HDI_FORMAT
;
hdItem
.
pszText
=
item
s
[
i
];
hdItem
.
pszText
=
(
char
*
)
item_text
s
[
i
];
hdItem
.
fmt
=
HDF_LEFT
;
hdItem
.
cxy
=
80
;
...
...
@@ -1146,8 +1144,8 @@ static void test_hdm_index_messages(HWND hParent)
ok_sequence
(
sequences
,
HEADER_SEQ_INDEX
,
getItem_seq
,
"getItem sequence testing"
,
FALSE
);
/* check if the item is the right one */
ok
(
!
strcmp
(
hdItem
.
pszText
,
firstHeaderItem
),
"got wrong item %s, expected %s
\n
"
,
hdItem
.
pszText
,
firstHeaderItem
);
ok
(
!
strcmp
(
hdItem
.
pszText
,
item_texts
[
0
]
),
"got wrong item %s, expected %s
\n
"
,
hdItem
.
pszText
,
item_texts
[
0
]
);
expect
(
80
,
hdItem
.
cxy
);
iSize
=
SendMessageA
(
hChild
,
HDM_GETITEMCOUNT
,
0
,
0
);
...
...
@@ -1166,15 +1164,15 @@ static void test_hdm_index_messages(HWND hParent)
retVal
=
SendMessageA
(
hChild
,
HDM_SETORDERARRAY
,
iSize
,
(
LPARAM
)
lpiarray
);
ok
(
retVal
==
TRUE
,
"Setting header items order should return TRUE, got %d
\n
"
,
retVal
);
retVal
=
SendMessageA
(
hChild
,
HDM_GETORDERARRAY
,
iSize
,
(
LPARAM
)
lpiarrayReceived
);
retVal
=
SendMessageA
(
hChild
,
HDM_GETORDERARRAY
,
2
,
(
LPARAM
)
array
);
ok
(
retVal
==
TRUE
,
"Getting header items order should return TRUE, got %d
\n
"
,
retVal
);
ok_sequence
(
sequences
,
HEADER_SEQ_INDEX
,
orderArray_seq
,
"set_get_orderArray sequence testing"
,
FALSE
);
/* check if the array order is set correctly and the size of the array is correct. */
expect
(
2
,
iSize
);
expect
(
lpiarray
[
0
],
lpiarrayReceived
[
0
]);
expect
(
lpiarray
[
1
],
lpiarrayReceived
[
1
]);
ok
(
lpiarray
[
0
]
==
array
[
0
],
"got %d, expected %d
\n
"
,
array
[
0
],
lpiarray
[
0
]);
ok
(
lpiarray
[
1
]
==
array
[
1
],
"got %d, expected %d
\n
"
,
array
[
1
],
lpiarray
[
1
]);
hdItem
.
mask
=
HDI_FORMAT
;
hdItem
.
fmt
=
HDF_CENTER
|
HDF_STRING
;
...
...
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