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
507bc401
Commit
507bc401
authored
May 30, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2dc9af8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
system.c
dlls/uxtheme/tests/system.c
+9
-13
No files found.
dlls/uxtheme/tests/system.c
View file @
507bc401
...
...
@@ -443,9 +443,8 @@ static void test_GetCurrentThemeName(void)
ok
(
hRes
==
E_PROP_ID_UNSUPPORTED
,
"Expected E_PROP_ID_UNSUPPORTED, got 0x%08x
\n
"
,
hRes
);
/* The same is true if the number of characters is too small for Color and/or Size */
hRes
=
GetCurrentThemeName
(
currentTheme
,
sizeof
(
currentTheme
)
/
sizeof
(
WCHAR
),
currentColor
,
2
,
currentSize
,
sizeof
(
currentSize
)
/
sizeof
(
WCHAR
));
hRes
=
GetCurrentThemeName
(
currentTheme
,
ARRAY_SIZE
(
currentTheme
),
currentColor
,
2
,
currentSize
,
ARRAY_SIZE
(
currentSize
));
if
(
bThemeActive
)
todo_wine
ok
(
hRes
==
E_NOT_SUFFICIENT_BUFFER
||
...
...
@@ -455,7 +454,7 @@ static void test_GetCurrentThemeName(void)
ok
(
hRes
==
E_PROP_ID_UNSUPPORTED
,
"Expected E_PROP_ID_UNSUPPORTED, got 0x%08x
\n
"
,
hRes
);
/* Given number of characters is correct */
hRes
=
GetCurrentThemeName
(
currentTheme
,
sizeof
(
currentTheme
)
/
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
0
);
hRes
=
GetCurrentThemeName
(
currentTheme
,
ARRAY_SIZE
(
currentTheme
),
NULL
,
0
,
NULL
,
0
);
if
(
bThemeActive
)
ok
(
hRes
==
S_OK
,
"Expected S_OK, got 0x%08x
\n
"
,
hRes
);
else
...
...
@@ -471,26 +470,23 @@ static void test_GetCurrentThemeName(void)
"Expected E_PROP_ID_UNSUPPORTED, got 0x%08x
\n
"
,
hRes
);
/* The too large case is only for the theme name, not for color name or size name */
hRes
=
GetCurrentThemeName
(
currentTheme
,
sizeof
(
currentTheme
)
/
sizeof
(
WCHAR
),
currentColor
,
sizeof
(
currentTheme
),
currentSize
,
sizeof
(
currentSize
)
/
sizeof
(
WCHAR
));
hRes
=
GetCurrentThemeName
(
currentTheme
,
ARRAY_SIZE
(
currentTheme
),
currentColor
,
sizeof
(
currentTheme
),
currentSize
,
ARRAY_SIZE
(
currentSize
));
if
(
bThemeActive
)
ok
(
hRes
==
S_OK
,
"Expected S_OK, got 0x%08x
\n
"
,
hRes
);
else
ok
(
hRes
==
E_PROP_ID_UNSUPPORTED
,
"Expected E_PROP_ID_UNSUPPORTED, got 0x%08x
\n
"
,
hRes
);
hRes
=
GetCurrentThemeName
(
currentTheme
,
sizeof
(
currentTheme
)
/
sizeof
(
WCHAR
),
currentColor
,
sizeof
(
currentTheme
)
/
sizeof
(
WCHAR
),
currentSize
,
sizeof
(
currentSize
));
hRes
=
GetCurrentThemeName
(
currentTheme
,
ARRAY_SIZE
(
currentTheme
),
currentColor
,
ARRAY_SIZE
(
currentTheme
),
currentSize
,
sizeof
(
currentSize
));
if
(
bThemeActive
)
ok
(
hRes
==
S_OK
,
"Expected S_OK, got 0x%08x
\n
"
,
hRes
);
else
ok
(
hRes
==
E_PROP_ID_UNSUPPORTED
,
"Expected E_PROP_ID_UNSUPPORTED, got 0x%08x
\n
"
,
hRes
);
/* Correct call */
hRes
=
GetCurrentThemeName
(
currentTheme
,
sizeof
(
currentTheme
)
/
sizeof
(
WCHAR
),
currentColor
,
sizeof
(
currentColor
)
/
sizeof
(
WCHAR
),
currentSize
,
sizeof
(
currentSize
)
/
sizeof
(
WCHAR
));
hRes
=
GetCurrentThemeName
(
currentTheme
,
ARRAY_SIZE
(
currentTheme
),
currentColor
,
ARRAY_SIZE
(
currentColor
),
currentSize
,
ARRAY_SIZE
(
currentSize
));
if
(
bThemeActive
)
ok
(
hRes
==
S_OK
,
"Expected S_OK, got 0x%08x
\n
"
,
hRes
);
else
...
...
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