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
215ca8a4
Commit
215ca8a4
authored
Oct 28, 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 GetNumberOfEventLogRecords tests.
parent
11651f57
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 @
215ca8a4
...
@@ -149,6 +149,44 @@ static void test_info(void)
...
@@ -149,6 +149,44 @@ static void test_info(void)
CloseEventLog
(
handle
);
CloseEventLog
(
handle
);
}
}
static
void
test_count
(
void
)
{
HANDLE
handle
;
BOOL
ret
;
DWORD
count
;
SetLastError
(
0xdeadbeef
);
ret
=
GetNumberOfEventLogRecords
(
NULL
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
count
=
0xdeadbeef
;
ret
=
GetNumberOfEventLogRecords
(
NULL
,
&
count
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
count
==
0xdeadbeef
,
"Expected count to stay unchanged
\n
"
);
}
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
SetLastError
(
0xdeadbeef
);
ret
=
GetNumberOfEventLogRecords
(
handle
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
count
=
0xdeadbeef
;
ret
=
GetNumberOfEventLogRecords
(
handle
,
&
count
);
ok
(
ret
,
"Expected succes
\n
"
);
ok
(
count
!=
0xdeadbeef
,
"Expected the number of records
\n
"
);
CloseEventLog
(
handle
);
}
START_TEST
(
eventlog
)
START_TEST
(
eventlog
)
{
{
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -164,4 +202,5 @@ START_TEST(eventlog)
...
@@ -164,4 +202,5 @@ START_TEST(eventlog)
/* Parameters only */
/* Parameters only */
test_open_close
();
test_open_close
();
test_info
();
test_info
();
test_count
();
}
}
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