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
0a74c8d2
Commit
0a74c8d2
authored
Jun 05, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
84f58739
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
mimeole.c
dlls/inetcomm/tests/mimeole.c
+7
-7
No files found.
dlls/inetcomm/tests/mimeole.c
View file @
0a74c8d2
...
@@ -129,7 +129,7 @@ static WCHAR *a2w(const char *str)
...
@@ -129,7 +129,7 @@ static WCHAR *a2w(const char *str)
static
int
strcmp_wa
(
const
WCHAR
*
strw
,
const
char
*
stra
)
static
int
strcmp_wa
(
const
WCHAR
*
strw
,
const
char
*
stra
)
{
{
WCHAR
buf
[
512
];
WCHAR
buf
[
512
];
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
buf
,
ARRAY_SIZE
(
buf
));
return
lstrcmpW
(
strw
,
buf
);
return
lstrcmpW
(
strw
,
buf
);
}
}
...
@@ -1430,7 +1430,7 @@ static void test_mhtml_protocol_binding(const mhtml_binding_test_t *test)
...
@@ -1430,7 +1430,7 @@ static void test_mhtml_protocol_binding(const mhtml_binding_test_t *test)
CloseHandle
(
file
);
CloseHandle
(
file
);
sprintf
(
urla
,
test
->
url
,
file_name
);
sprintf
(
urla
,
test
->
url
,
file_name
);
MultiByteToWideChar
(
CP_ACP
,
0
,
urla
,
-
1
,
test_url
,
sizeof
(
test_url
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
urla
,
-
1
,
test_url
,
ARRAY_SIZE
(
test_url
));
hres
=
CoCreateInstance
(
&
CLSID_IMimeHtmlProtocol
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
hres
=
CoCreateInstance
(
&
CLSID_IMimeHtmlProtocol
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
ok
(
hres
==
S_OK
,
"Could not create protocol handler: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not create protocol handler: %08x
\n
"
,
hres
);
...
@@ -1514,13 +1514,13 @@ static void test_mhtml_protocol_info(void)
...
@@ -1514,13 +1514,13 @@ static void test_mhtml_protocol_info(void)
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
protocol_info
);
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
protocol_info
);
ok
(
hres
==
S_OK
,
"Could not create protocol info: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not create protocol info: %08x
\n
"
,
hres
);
for
(
i
=
0
;
i
<
sizeof
(
combine_tests
)
/
sizeof
(
*
combine_tests
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
combine_tests
);
i
++
)
{
base_url
=
a2w
(
combine_tests
[
i
].
base_url
);
base_url
=
a2w
(
combine_tests
[
i
].
base_url
);
relative_url
=
a2w
(
combine_tests
[
i
].
relative_url
);
relative_url
=
a2w
(
combine_tests
[
i
].
relative_url
);
combined_len
=
0xdeadbeef
;
combined_len
=
0xdeadbeef
;
hres
=
IInternetProtocolInfo_CombineUrl
(
protocol_info
,
base_url
,
relative_url
,
ICU_BROWSER_MODE
,
hres
=
IInternetProtocolInfo_CombineUrl
(
protocol_info
,
base_url
,
relative_url
,
ICU_BROWSER_MODE
,
combined_url
,
sizeof
(
combined_url
)
/
sizeof
(
WCHAR
),
&
combined_len
,
0
);
combined_url
,
ARRAY_SIZE
(
combined_url
),
&
combined_len
,
0
);
todo_wine_if
(
combine_tests
[
i
].
todo
)
todo_wine_if
(
combine_tests
[
i
].
todo
)
ok
(
hres
==
S_OK
,
"[%u] CombineUrl failed: %08x
\n
"
,
i
,
hres
);
ok
(
hres
==
S_OK
,
"[%u] CombineUrl failed: %08x
\n
"
,
i
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
...
@@ -1541,7 +1541,7 @@ static void test_mhtml_protocol_info(void)
...
@@ -1541,7 +1541,7 @@ static void test_mhtml_protocol_info(void)
}
}
hres
=
IInternetProtocolInfo_CombineUrl
(
protocol_info
,
http_url
,
http_url
,
ICU_BROWSER_MODE
,
hres
=
IInternetProtocolInfo_CombineUrl
(
protocol_info
,
http_url
,
http_url
,
ICU_BROWSER_MODE
,
combined_url
,
sizeof
(
combined_url
)
/
sizeof
(
WCHAR
),
&
combined_len
,
0
);
combined_url
,
ARRAY_SIZE
(
combined_url
),
&
combined_len
,
0
);
ok
(
hres
==
E_FAIL
,
"CombineUrl failed: %08x
\n
"
,
hres
);
ok
(
hres
==
E_FAIL
,
"CombineUrl failed: %08x
\n
"
,
hres
);
IInternetProtocolInfo_Release
(
protocol_info
);
IInternetProtocolInfo_Release
(
protocol_info
);
...
@@ -1605,7 +1605,7 @@ static void test_mhtml_protocol(void)
...
@@ -1605,7 +1605,7 @@ static void test_mhtml_protocol(void)
if
(
!
broken_mhtml_resolver
)
if
(
!
broken_mhtml_resolver
)
test_mhtml_protocol_info
();
test_mhtml_protocol_info
();
for
(
i
=
0
;
i
<
sizeof
(
binding_tests
)
/
sizeof
(
*
binding_tests
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
binding_tests
);
i
++
)
test_mhtml_protocol_binding
(
binding_tests
+
i
);
test_mhtml_protocol_binding
(
binding_tests
+
i
);
}
}
...
@@ -1628,7 +1628,7 @@ static void test_MimeOleObjectFromMoniker(void)
...
@@ -1628,7 +1628,7 @@ static void test_MimeOleObjectFromMoniker(void)
{
"../test.mht"
,
"mhtml:../test.mht"
}
{
"../test.mht"
,
"mhtml:../test.mht"
}
};
};
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
*
tests
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests
);
i
++
)
{
url
=
a2w
(
tests
[
i
].
url
);
url
=
a2w
(
tests
[
i
].
url
);
hres
=
CreateURLMoniker
(
NULL
,
url
,
&
mon
);
hres
=
CreateURLMoniker
(
NULL
,
url
,
&
mon
);
ok
(
hres
==
S_OK
,
"CreateURLMoniker failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"CreateURLMoniker failed: %08x
\n
"
,
hres
);
...
...
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