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
f797f63d
Commit
f797f63d
authored
Dec 04, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Some tests for CoGetMalloc().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c23b6f5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
compobj.c
dlls/ole32/tests/compobj.c
+46
-0
No files found.
dlls/ole32/tests/compobj.c
View file @
f797f63d
...
@@ -2619,6 +2619,51 @@ static void test_CoWaitForMultipleHandles(void)
...
@@ -2619,6 +2619,51 @@ static void test_CoWaitForMultipleHandles(void)
CoUninitialize
();
CoUninitialize
();
}
}
static
void
test_CoGetMalloc
(
void
)
{
IMalloc
*
imalloc
;
HRESULT
hr
;
if
(
0
)
/* crashes on native */
hr
=
CoGetMalloc
(
0
,
NULL
);
imalloc
=
(
void
*
)
0xdeadbeef
;
hr
=
CoGetMalloc
(
0
,
&
imalloc
);
todo_wine
{
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
imalloc
==
NULL
,
"got %p
\n
"
,
imalloc
);
}
imalloc
=
(
void
*
)
0xdeadbeef
;
hr
=
CoGetMalloc
(
MEMCTX_SHARED
,
&
imalloc
);
todo_wine
{
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
imalloc
==
NULL
,
"got %p
\n
"
,
imalloc
);
}
imalloc
=
(
void
*
)
0xdeadbeef
;
hr
=
CoGetMalloc
(
MEMCTX_MACSYSTEM
,
&
imalloc
);
todo_wine
{
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
imalloc
==
NULL
,
"got %p
\n
"
,
imalloc
);
}
imalloc
=
(
void
*
)
0xdeadbeef
;
hr
=
CoGetMalloc
(
MEMCTX_UNKNOWN
,
&
imalloc
);
todo_wine
{
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
imalloc
==
NULL
,
"got %p
\n
"
,
imalloc
);
}
imalloc
=
(
void
*
)
0xdeadbeef
;
hr
=
CoGetMalloc
(
MEMCTX_SAME
,
&
imalloc
);
todo_wine
{
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
imalloc
==
NULL
,
"got %p
\n
"
,
imalloc
);
}
imalloc
=
NULL
;
hr
=
CoGetMalloc
(
MEMCTX_TASK
,
&
imalloc
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
imalloc
!=
NULL
,
"got %p
\n
"
,
imalloc
);
IMalloc_Release
(
imalloc
);
}
static
void
init_funcs
(
void
)
static
void
init_funcs
(
void
)
{
{
HMODULE
hOle32
=
GetModuleHandleA
(
"ole32"
);
HMODULE
hOle32
=
GetModuleHandleA
(
"ole32"
);
...
@@ -2681,4 +2726,5 @@ START_TEST(compobj)
...
@@ -2681,4 +2726,5 @@ START_TEST(compobj)
test_OleRegGetMiscStatus
();
test_OleRegGetMiscStatus
();
test_CoCreateGuid
();
test_CoCreateGuid
();
test_CoWaitForMultipleHandles
();
test_CoWaitForMultipleHandles
();
test_CoGetMalloc
();
}
}
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