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
f4b447ae
Commit
f4b447ae
authored
Feb 21, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Feb 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add a short test for GetOverlappedResult.
parent
e4faabfa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
file.c
dlls/kernel/tests/file.c
+58
-0
No files found.
dlls/kernel/tests/file.c
View file @
f4b447ae
...
...
@@ -1425,6 +1425,63 @@ static void test_OpenFile_exists(void)
ok
(
hFile
==
HFILE_ERROR
,
"hFile != HFILE_ERROR : %ld
\n
"
,
GetLastError
());
}
static
void
test_overlapped
(
void
)
{
OVERLAPPED
ov
;
DWORD
r
,
result
;
/* GetOverlappedResult crashes if the 2nd or 3rd param are NULL */
memset
(
&
ov
,
0
,
sizeof
ov
);
result
=
1
;
r
=
GetOverlappedResult
(
0
,
&
ov
,
&
result
,
0
);
ok
(
r
==
TRUE
,
"should return false
\n
"
);
ok
(
result
==
0
,
"result wrong
\n
"
);
result
=
0
;
ov
.
Internal
=
0
;
ov
.
InternalHigh
=
0xabcd
;
r
=
GetOverlappedResult
(
0
,
&
ov
,
&
result
,
0
);
ok
(
r
==
TRUE
,
"should return false
\n
"
);
ok
(
result
==
0xabcd
,
"result wrong
\n
"
);
SetLastError
(
0xb00
);
result
=
0
;
ov
.
Internal
=
STATUS_INVALID_HANDLE
;
ov
.
InternalHigh
=
0xabcd
;
r
=
GetOverlappedResult
(
0
,
&
ov
,
&
result
,
0
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"error wrong
\n
"
);
ok
(
r
==
FALSE
,
"should return false
\n
"
);
ok
(
result
==
0xabcd
,
"result wrong
\n
"
);
result
=
0
;
ov
.
Internal
=
STATUS_PENDING
;
ov
.
InternalHigh
=
0xabcd
;
r
=
GetOverlappedResult
(
0
,
&
ov
,
&
result
,
0
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_IO_INCOMPLETE
,
"error wrong
\n
"
);
}
ok
(
r
==
FALSE
,
"should return false
\n
"
);
ok
(
result
==
0
,
"result wrong
\n
"
);
ov
.
hEvent
=
CreateEvent
(
NULL
,
1
,
1
,
NULL
);
ov
.
Internal
=
STATUS_PENDING
;
ov
.
InternalHigh
=
0xabcd
;
r
=
GetOverlappedResult
(
0
,
&
ov
,
&
result
,
0
);
ok
(
GetLastError
()
==
ERROR_IO_INCOMPLETE
,
"error wrong
\n
"
);
ok
(
r
==
FALSE
,
"should return false
\n
"
);
ResetEvent
(
ov
.
hEvent
);
ov
.
Internal
=
STATUS_PENDING
;
ov
.
InternalHigh
=
0
;
r
=
GetOverlappedResult
(
0
,
&
ov
,
&
result
,
0
);
ok
(
GetLastError
()
==
ERROR_IO_INCOMPLETE
,
"error wrong
\n
"
);
ok
(
r
==
FALSE
,
"should return false
\n
"
);
r
=
CloseHandle
(
ov
.
hEvent
);
ok
(
r
==
TRUE
,
"close handle failed
\n
"
);
}
START_TEST
(
file
)
{
...
...
@@ -1455,4 +1512,5 @@ START_TEST(file)
test_async_file_errors
();
test_read_write
();
test_OpenFile_exists
();
test_overlapped
();
}
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