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
1fe325fd
Commit
1fe325fd
authored
Oct 29, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Oct 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add some GetOldestEventLogRecord tests.
parent
de72f405
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
eventlog.c
dlls/advapi32/tests/eventlog.c
+39
-0
No files found.
dlls/advapi32/tests/eventlog.c
View file @
1fe325fd
...
...
@@ -182,6 +182,44 @@ static void test_count(void)
CloseEventLog
(
handle
);
}
static
void
test_oldest
(
void
)
{
HANDLE
handle
;
BOOL
ret
;
DWORD
oldest
;
SetLastError
(
0xdeadbeef
);
ret
=
GetOldestEventLogRecord
(
NULL
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
oldest
=
0xdeadbeef
;
ret
=
GetOldestEventLogRecord
(
NULL
,
&
oldest
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
oldest
==
0xdeadbeef
,
"Expected oldest to stay unchanged
\n
"
);
}
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
SetLastError
(
0xdeadbeef
);
ret
=
GetOldestEventLogRecord
(
handle
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
oldest
=
0xdeadbeef
;
ret
=
GetOldestEventLogRecord
(
handle
,
&
oldest
);
ok
(
ret
,
"Expected succes
\n
"
);
ok
(
oldest
!=
0xdeadbeef
,
"Expected the number of the oldest record
\n
"
);
CloseEventLog
(
handle
);
}
START_TEST
(
eventlog
)
{
SetLastError
(
0xdeadbeef
);
...
...
@@ -198,4 +236,5 @@ START_TEST(eventlog)
test_open_close
();
test_info
();
test_count
();
test_oldest
();
}
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