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
f69ec2c6
Commit
f69ec2c6
authored
Aug 30, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a FlushFileBuffers test for a COM port.
parent
82710124
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
comm.c
dlls/kernel32/tests/comm.c
+26
-0
No files found.
dlls/kernel32/tests/comm.c
View file @
f69ec2c6
...
...
@@ -1872,9 +1872,35 @@ done:
CloseHandle
(
hcom
);
}
static
void
test_FlushFileBuffers
(
void
)
{
HANDLE
hcom
;
DWORD
ret
,
bytes
,
errors
;
COMSTAT
stat
;
hcom
=
test_OpenComm
(
FALSE
);
if
(
hcom
==
INVALID_HANDLE_VALUE
)
return
;
ret
=
WriteFile
(
hcom
,
"
\0\0\0\0\0\0\0
"
,
7
,
&
bytes
,
NULL
);
ok
(
ret
,
"WriteFile error %d
\n
"
,
GetLastError
());
ok
(
bytes
==
7
,
"expected 7, got %u
\n
"
,
bytes
);
ret
=
FlushFileBuffers
(
hcom
);
ok
(
ret
,
"FlushFileBuffers error %d
\n
"
,
GetLastError
());
ret
=
ClearCommError
(
hcom
,
&
errors
,
&
stat
);
ok
(
ret
,
"ClearCommError error %d
\n
"
,
GetLastError
());
ok
(
stat
.
cbInQue
==
0
,
"expected 0, got %d bytes in InQueue
\n
"
,
stat
.
cbInQue
);
ok
(
stat
.
cbOutQue
==
0
,
"expected 0, got %d bytes in OutQueue
\n
"
,
stat
.
cbOutQue
);
ok
(
errors
==
0
,
"expected errors 0, got %#x
\n
"
,
errors
);
CloseHandle
(
hcom
);
}
START_TEST
(
comm
)
{
test_ClearCommError
();
/* keep it the very first test */
test_FlushFileBuffers
();
test_BuildCommDCB
();
test_ReadTimeOut
();
test_waittxempty
();
...
...
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