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
6996a9c8
Commit
6996a9c8
authored
Jan 25, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comcat/tests: Skip tests if we can't create a test category.
parent
f63d950d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
comcat.c
dlls/comcat/tests/comcat.c
+14
-11
No files found.
dlls/comcat/tests/comcat.c
View file @
6996a9c8
...
...
@@ -31,19 +31,19 @@
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x \n", hr)
static
void
register_testentry
(
void
)
static
BOOL
register_testentry
(
void
)
{
HKEY
hkey
,
hkey2
;
HKEY
hkey
=
0
,
hkey2
=
0
;
DWORD
ret
;
RegCreateKeyA
(
HKEY_CLASSES_ROOT
,
"CLSID
\\
{deadcafe-beed-bead-dead-cafebeaddead}"
,
&
hkey
);
RegSetValueA
(
hkey
,
NULL
,
REG_SZ
,
"ComCat Test key"
,
16
);
RegCreateKeyA
(
hkey
,
ret
=
RegCreateKeyA
(
HKEY_CLASSES_ROOT
,
"CLSID
\\
{deadcafe-beed-bead-dead-cafebeaddead}"
,
&
hkey
);
if
(
!
ret
)
ret
=
RegSetValueA
(
hkey
,
NULL
,
REG_SZ
,
"ComCat Test key"
,
16
);
if
(
!
ret
)
ret
=
RegCreateKeyA
(
hkey
,
"Implemented Categories
\\
{deadcafe-0000-0000-0000-000000000000}"
,
&
hkey2
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey2
);
return
!
ret
;
}
static
void
unregister_testentry
(
void
)
...
...
@@ -107,9 +107,9 @@ static void do_enum(void)
ok
(
fetched
==
0
,
"Fetched wrong number of guids %u
\n
"
,
fetched
);
IEnumGUID_Release
(
pIEnum
);
register_testentry
();
hr
=
ICatInformation_EnumClassesOfCategories
(
pICat
,
1
,
the_cat
,
-
1
,
NULL
,
&
pIEnum
);
if
(
register_testentry
())
{
hr
=
ICatInformation_EnumClassesOfCategories
(
pICat
,
1
,
the_cat
,
-
1
,
NULL
,
&
pIEnum
);
ok_ole_success
(
hr
,
"ICatInformation_EnumClassesOfCategories"
);
hr
=
IEnumGUID_Next
(
pIEnum
,
1
,
the_guid
,
&
fetched
);
...
...
@@ -117,8 +117,11 @@ static void do_enum(void)
ok
(
IsEqualGUID
(
the_guid
,
&
wanted_guid
),
"Guids do not match
\n
"
);
IEnumGUID_Release
(
pIEnum
);
ICatInformation_Release
(
pICat
);
unregister_testentry
();
}
else
skip
(
"Could not register the test category
\n
"
);
ICatInformation_Release
(
pICat
);
OleUninitialize
();
}
...
...
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