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
6468ffd8
Commit
6468ffd8
authored
Jun 16, 2023
by
Jactry Zeng
Committed by
Alexandre Julliard
Jun 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl/tests: Move regular DWORD tests into a loop.
parent
f9785543
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
registrar.c
dlls/atl/tests/registrar.c
+22
-18
No files found.
dlls/atl/tests/registrar.c
View file @
6468ffd8
...
...
@@ -59,7 +59,20 @@ static void test_registrar(void)
IRegistrar
*
registrar
=
NULL
;
HRESULT
hr
;
INT
count
;
int
i
;
WCHAR
*
textW
=
NULL
;
struct
dword_test
{
const
char
*
name
;
BOOL
preserved
;
LONGLONG
value
;
}
dword_tests
[]
=
{
{
"dword_unquoted_dec"
,
TRUE
,
1
},
{
"dword_quoted_dec"
,
TRUE
,
1
},
{
"dword_quoted_hex"
,
FALSE
,
0xA
},
{
"dword_unquoted_hex"
,
FALSE
,
0xA
},
};
if
(
!
GetProcAddress
(
GetModuleHandleA
(
"atl.dll"
),
"AtlAxAttachControl"
))
{
...
...
@@ -112,25 +125,16 @@ static void test_registrar(void)
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %ld
\n
"
,
lret
);
ok
(
!
strcmp
(
buffer
,
"str'ing"
),
"wrong data %s
\n
"
,
debugstr_a
(
buffer
));
for
(
i
=
0
;
i
<
ARRAYSIZE
(
dword_tests
);
i
++
)
{
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_unquoted_hex"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %ld
\n
"
,
lret
);
ok
(
dword
!=
0xA
,
"unquoted hex is not supposed to be preserved
\n
"
);
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_quoted_hex"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %ld
\n
"
,
lret
);
ok
(
dword
!=
0xA
,
"quoted hex is not supposed to be preserved
\n
"
);
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_unquoted_dec"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %ld
\n
"
,
lret
);
ok
(
dword
==
1
,
"unquoted dec is not supposed to be %ld
\n
"
,
dword
);
size
=
sizeof
(
dword
);
lret
=
RegQueryValueExA
(
key
,
"dword_quoted_dec"
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"RegQueryValueExA failed, error %ld
\n
"
,
lret
);
ok
(
dword
==
1
,
"quoted dec is not supposed to be %ld
\n
"
,
dword
);
lret
=
RegQueryValueExA
(
key
,
dword_tests
[
i
].
name
,
NULL
,
NULL
,
(
BYTE
*
)
&
dword
,
&
size
);
ok
(
lret
==
ERROR_SUCCESS
,
"Test %d: RegQueryValueExA failed %ld.
\n
"
,
i
,
lret
);
if
(
dword_tests
[
i
].
preserved
)
ok
(
dword
==
dword_tests
[
i
].
value
,
"Test %d: got unexpected value %lu.
\n
"
,
i
,
dword
);
else
ok
(
dword
!=
dword_tests
[
i
].
value
,
"Test %d: is not supposed to be preserved.
\n
"
,
i
);
}
size
=
4
;
lret
=
RegQueryValueExA
(
key
,
"binary_quoted"
,
NULL
,
NULL
,
bytes
,
&
size
);
...
...
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