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
d8a5bc92
Commit
d8a5bc92
authored
Oct 26, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Oct 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wer/tests: Add initial tests.
parent
ac194c38
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
2 deletions
+124
-2
configure
configure
+2
-1
configure.ac
configure.ac
+2
-1
Makefile.in
dlls/wer/Makefile.in
+1
-0
Makefile.in
dlls/wer/tests/Makefile.in
+7
-0
main.c
dlls/wer/tests/main.c
+110
-0
werapi.h
include/werapi.h
+2
-0
No files found.
configure
View file @
d8a5bc92
...
...
@@ -14988,7 +14988,8 @@ wine_fn_config_dll vwin32.vxd enable_win16
wine_fn_config_dll w32skrnl enable_win16
wine_fn_config_dll w32sys.dll16 enable_win16
wine_fn_config_dll wbemprox enable_wbemprox
wine_fn_config_dll wer enable_wer
wine_fn_config_dll wer enable_wer wer
wine_fn_config_test dlls/wer/tests wer_test
wine_fn_config_dll wiaservc enable_wiaservc
wine_fn_config_dll win32s16.dll16 enable_win16
wine_fn_config_dll win87em.dll16 enable_win16
...
...
configure.ac
View file @
d8a5bc92
...
...
@@ -2734,7 +2734,8 @@ WINE_CONFIG_DLL(vwin32.vxd,enable_win16)
WINE_CONFIG_DLL(w32skrnl,enable_win16)
WINE_CONFIG_DLL(w32sys.dll16,enable_win16)
WINE_CONFIG_DLL(wbemprox)
WINE_CONFIG_DLL(wer)
WINE_CONFIG_DLL(wer,,[wer])
WINE_CONFIG_TEST(dlls/wer/tests)
WINE_CONFIG_DLL(wiaservc)
WINE_CONFIG_DLL(win32s16.dll16,enable_win16)
WINE_CONFIG_DLL(win87em.dll16,enable_win16)
...
...
dlls/wer/Makefile.in
View file @
d8a5bc92
MODULE
=
wer.dll
IMPORTLIB
=
wer
C_SRCS
=
\
main.c
...
...
dlls/wer/tests/Makefile.in
0 → 100644
View file @
d8a5bc92
TESTDLL
=
wer.dll
IMPORTS
=
wer
C_SRCS
=
\
main.c
@MAKE_TEST_RULES@
dlls/wer/tests/main.c
0 → 100644
View file @
d8a5bc92
/*
* Unit test suite for windows error reporting in Vista and above
*
* Copyright 2010 Detlef Riekenberg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winreg.h"
#include "werapi.h"
#include "wine/test.h"
static
const
WCHAR
empty
[]
=
{
0
};
static
const
WCHAR
winetest_wer
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
't'
,
'e'
,
's'
,
't'
,
'_'
,
'w'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
/* ###### */
static
void
test_WerAddExcludedApplication
(
void
)
{
HRESULT
hr
;
/* clean state */
hr
=
WerRemoveExcludedApplication
(
winetest_wer
,
FALSE
);
if
(
hr
==
E_NOTIMPL
)
{
skip
(
"Wer*ExcludedApplication not implemented
\n
"
);
return
;
}
ok
((
hr
==
S_OK
)
||
(
hr
==
E_FAIL
)
||
__HRESULT_FROM_WIN32
(
ERROR_ENVVAR_NOT_FOUND
),
"got 0x%x (expected S_OK, E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))
\n
"
,
hr
);
hr
=
WerAddExcludedApplication
(
NULL
,
FALSE
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%x (expected E_INVALIDARG)
\n
"
,
hr
);
hr
=
WerAddExcludedApplication
(
empty
,
FALSE
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%x (expected E_INVALIDARG)
\n
"
,
hr
);
hr
=
WerAddExcludedApplication
(
winetest_wer
,
FALSE
);
ok
(
hr
==
S_OK
,
"got 0x%x (expected S_OK)
\n
"
,
hr
);
/* app already in the list */
hr
=
WerAddExcludedApplication
(
winetest_wer
,
FALSE
);
ok
(
hr
==
S_OK
,
"got 0x%x (expected S_OK)
\n
"
,
hr
);
/* cleanup */
hr
=
WerRemoveExcludedApplication
(
winetest_wer
,
FALSE
);
ok
(
hr
==
S_OK
,
"got 0x%x (expected S_OK)
\n
"
,
hr
);
}
/* #### */
static
void
test_WerRemoveExcludedApplication
(
void
)
{
HRESULT
hr
;
/* clean state */
hr
=
WerRemoveExcludedApplication
(
winetest_wer
,
FALSE
);
if
(
hr
==
E_NOTIMPL
)
{
skip
(
"Wer*ExcludedApplication not implemented
\n
"
);
return
;
}
ok
((
hr
==
S_OK
)
||
(
hr
==
E_FAIL
)
||
__HRESULT_FROM_WIN32
(
ERROR_ENVVAR_NOT_FOUND
),
"got 0x%x (expected S_OK, E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))
\n
"
,
hr
);
hr
=
WerAddExcludedApplication
(
winetest_wer
,
FALSE
);
ok
(
hr
==
S_OK
,
"got 0x%x (expected S_OK)
\n
"
,
hr
);
hr
=
WerRemoveExcludedApplication
(
NULL
,
FALSE
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%x (expected E_INVALIDARG)
\n
"
,
hr
);
hr
=
WerRemoveExcludedApplication
(
empty
,
FALSE
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%x (expected E_INVALIDARG)
\n
"
,
hr
);
hr
=
WerRemoveExcludedApplication
(
winetest_wer
,
FALSE
);
ok
(
hr
==
S_OK
,
"got 0x%x (expected S_OK)
\n
"
,
hr
);
/* app not in the list */
hr
=
WerRemoveExcludedApplication
(
winetest_wer
,
FALSE
);
ok
((
hr
==
E_FAIL
)
||
__HRESULT_FROM_WIN32
(
ERROR_ENVVAR_NOT_FOUND
),
"got 0x%x (expected E_FAIL or HRESULT_FROM_WIN32(ERROR_ENVVAR_NOT_FOUND))
\n
"
,
hr
);
}
/* ########################### */
START_TEST
(
main
)
{
test_WerAddExcludedApplication
();
test_WerRemoveExcludedApplication
();
}
include/werapi.h
View file @
d8a5bc92
...
...
@@ -32,7 +32,9 @@ typedef enum _WER_REGISTER_FILE_TYPE
WerRegFileTypeMax
}
WER_REGISTER_FILE_TYPE
;
HRESULT
WINAPI
WerAddExcludedApplication
(
PCWSTR
,
BOOL
);
HRESULT
WINAPI
WerRegisterFile
(
PCWSTR
file
,
WER_REGISTER_FILE_TYPE
regfiletype
,
DWORD
flags
);
HRESULT
WINAPI
WerRemoveExcludedApplication
(
PCWSTR
,
BOOL
);
#ifdef __cplusplus
}
...
...
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