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
a1edebef
Commit
a1edebef
authored
Mar 25, 2015
by
Pierre Schweitzer
Committed by
Alexandre Julliard
Mar 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Add tests for the SetupOpenLog(), SetupLogErrorA(), SetupCloseLog() functions.
parent
a851aaa4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
misc.c
dlls/setupapi/tests/misc.c
+35
-0
No files found.
dlls/setupapi/tests/misc.c
View file @
a1edebef
...
...
@@ -776,6 +776,39 @@ static void test_defaultcallback(void)
SetupTermDefaultQueueCallback
(
ctxt
);
}
static
void
test_SetupLogError
(
void
)
{
BOOL
ret
;
DWORD
error
;
SetLastError
(
0xdeadbeef
);
ret
=
SetupLogErrorA
(
"Test without opening
\r\n
"
,
LogSevInformation
);
error
=
GetLastError
();
ok
(
!
ret
,
"SetupLogError succeeded
\n
"
);
ok
(
error
==
ERROR_FILE_INVALID
,
"got wrong error: %d
\n
"
,
error
);
ret
=
SetupOpenLog
(
FALSE
);
ok
(
ret
,
"SetupOpenLog failed
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
SetupLogErrorA
(
"Test with wrong log severity
\r\n
"
,
LogSevMaximum
);
error
=
GetLastError
();
ok
(
!
ret
,
"SetupLogError succeeded
\n
"
);
ok
(
error
==
0xdeadbeef
,
"got wrong error: %d
\n
"
,
error
);
ret
=
SetupLogErrorA
(
"Test without EOL"
,
LogSevInformation
);
ok
(
ret
,
"SetupLogError failed
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
SetupLogErrorA
(
NULL
,
LogSevInformation
);
ok
(
ret
||
broken
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
/* Win Vista+ */
),
"SetupLogError failed: %08x
\n
"
,
GetLastError
());
ret
=
SetupOpenLog
(
FALSE
);
ok
(
ret
,
"SetupOpenLog failed
\n
"
);
SetupCloseLog
();
}
START_TEST
(
misc
)
{
HMODULE
hsetupapi
=
GetModuleHandleA
(
"setupapi.dll"
);
...
...
@@ -807,4 +840,6 @@ START_TEST(misc)
win_skip
(
"SetupUninstallOEMInfA is not available
\n
"
);
test_defaultcallback
();
test_SetupLogError
();
}
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