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
a2f0cb85
Commit
a2f0cb85
authored
Dec 08, 2006
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Dec 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl/tests: Add tests for XcvClosePort.
parent
9f90c74f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
localmon.c
dlls/localspl/tests/localmon.c
+33
-0
No files found.
dlls/localspl/tests/localmon.c
View file @
a2f0cb85
...
...
@@ -291,6 +291,38 @@ static void test_InitializePrintMonitor(void)
"returned %p with %d (expected %p)
\n
"
,
res
,
GetLastError
(),
pm
);
}
/* ########################### */
static
void
test_XcvClosePort
(
void
)
{
DWORD
res
;
HANDLE
hXcv
;
if
((
pXcvOpenPort
==
NULL
)
||
(
pXcvClosePort
==
NULL
))
return
;
#if 0
/* crash with native localspl.dll (w2k+xp) */
res = pXcvClosePort(NULL);
res = pXcvClosePort(INVALID_HANDLE_VALUE);
#endif
SetLastError
(
0xdeadbeef
);
hXcv
=
(
HANDLE
)
0xdeadbeef
;
res
=
pXcvOpenPort
(
emptyW
,
SERVER_ACCESS_ADMINISTER
,
&
hXcv
);
ok
(
res
,
"returned %d with 0x%x and %p (expected '!= 0')
\n
"
,
res
,
GetLastError
(),
hXcv
);
if
(
res
)
{
SetLastError
(
0xdeadbeef
);
res
=
pXcvClosePort
(
hXcv
);
ok
(
res
,
"returned %d with 0x%x(expected '!= 0')
\n
"
,
res
,
GetLastError
());
#if 0
/* test for "Double Free": crash with native localspl.dll (w2k+xp) */
res = pXcvClosePort(hXcv);
#endif
}
}
/* ########################### */
...
...
@@ -400,5 +432,6 @@ START_TEST(localmon)
test_ConfigurePort
();
test_DeletePort
();
test_EnumPorts
();
test_XcvClosePort
();
test_XcvOpenPort
();
}
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