Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
0194595d
Commit
0194595d
authored
9 years ago
by
Hans Leidekker
Committed by
Alexandre Julliard
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
webservices: Add tests.
parent
a1d2f213
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+1
-0
1 addition, 0 deletions
configure
configure.ac
+1
-0
1 addition, 0 deletions
configure.ac
dlls/webservices/tests/Makefile.in
+5
-0
5 additions, 0 deletions
dlls/webservices/tests/Makefile.in
dlls/webservices/tests/reader.c
+118
-0
118 additions, 0 deletions
dlls/webservices/tests/reader.c
with
125 additions
and
0 deletions
configure
+
1
−
0
View file @
0194595d
...
...
@@ -17823,6 +17823,7 @@ wine_fn_config_test dlls/wbemdisp/tests wbemdisp_test
wine_fn_config_dll wbemprox enable_wbemprox clean
wine_fn_config_test dlls/wbemprox/tests wbemprox_test
wine_fn_config_dll webservices enable_webservices implib
wine_fn_config_test dlls/webservices/tests webservices_test
wine_fn_config_dll wer enable_wer implib
wine_fn_config_test dlls/wer/tests wer_test
wine_fn_config_dll wevtapi enable_wevtapi
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
1
−
0
View file @
0194595d
...
...
@@ -3375,6 +3375,7 @@ WINE_CONFIG_TEST(dlls/wbemdisp/tests)
WINE_CONFIG_DLL(wbemprox,,[clean])
WINE_CONFIG_TEST(dlls/wbemprox/tests)
WINE_CONFIG_DLL(webservices,,[implib])
WINE_CONFIG_TEST(dlls/webservices/tests)
WINE_CONFIG_DLL(wer,,[implib])
WINE_CONFIG_TEST(dlls/wer/tests)
WINE_CONFIG_DLL(wevtapi)
...
...
This diff is collapsed.
Click to expand it.
dlls/webservices/tests/Makefile.in
0 → 100644
+
5
−
0
View file @
0194595d
TESTDLL
=
webservices.dll
IMPORTS
=
webservices
C_SRCS
=
\
reader.c
This diff is collapsed.
Click to expand it.
dlls/webservices/tests/reader.c
0 → 100644
+
118
−
0
View file @
0194595d
/*
* Copyright 2015 Hans Leidekker for CodeWeavers
*
* 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
<stdio.h>
#include
"windows.h"
#include
"webservices.h"
#include
"wine/test.h"
static
void
test_WsCreateError
(
void
)
{
HRESULT
hr
;
WS_ERROR
*
error
;
WS_ERROR_PROPERTY
prop
;
ULONG
size
,
code
,
count
;
LANGID
langid
;
hr
=
WsCreateError
(
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
error
=
NULL
;
hr
=
WsCreateError
(
NULL
,
0
,
&
error
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
error
!=
NULL
,
"error not set
\n
"
);
count
=
0xdeadbeef
;
size
=
sizeof
(
count
);
hr
=
WsGetErrorProperty
(
error
,
WS_ERROR_PROPERTY_STRING_COUNT
,
&
count
,
size
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
!
count
,
"got %u
\n
"
,
count
);
hr
=
WsSetErrorProperty
(
error
,
WS_ERROR_PROPERTY_STRING_COUNT
,
&
count
,
size
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
code
=
0xdeadbeef
;
size
=
sizeof
(
code
);
hr
=
WsGetErrorProperty
(
error
,
WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE
,
&
code
,
size
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
!
code
,
"got %u
\n
"
,
code
);
code
=
0xdeadbeef
;
hr
=
WsSetErrorProperty
(
error
,
WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE
,
&
code
,
size
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
WsGetErrorProperty
(
error
,
WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE
,
&
code
,
size
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
code
==
0xdeadbeef
,
"got %u
\n
"
,
code
);
langid
=
0xdead
;
size
=
sizeof
(
langid
);
hr
=
WsGetErrorProperty
(
error
,
WS_ERROR_PROPERTY_LANGID
,
&
langid
,
size
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
langid
==
GetUserDefaultUILanguage
(),
"got %u
\n
"
,
langid
);
langid
=
MAKELANGID
(
LANG_DUTCH
,
SUBLANG_DEFAULT
);
hr
=
WsSetErrorProperty
(
error
,
WS_ERROR_PROPERTY_LANGID
,
&
langid
,
size
);
ok
(
hr
==
WS_E_INVALID_OPERATION
,
"got %08x
\n
"
,
hr
);
count
=
0xdeadbeef
;
size
=
sizeof
(
count
);
hr
=
WsGetErrorProperty
(
error
,
WS_ERROR_PROPERTY_LANGID
+
1
,
&
count
,
size
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
count
==
0xdeadbeef
,
"got %u
\n
"
,
count
);
WsFreeError
(
error
);
count
=
1
;
prop
.
id
=
WS_ERROR_PROPERTY_STRING_COUNT
;
prop
.
value
=
&
count
;
prop
.
valueSize
=
sizeof
(
count
);
hr
=
WsCreateError
(
&
prop
,
1
,
&
error
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
code
=
0xdeadbeef
;
prop
.
id
=
WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE
;
prop
.
value
=
&
code
;
prop
.
valueSize
=
sizeof
(
code
);
hr
=
WsCreateError
(
&
prop
,
1
,
&
error
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
langid
=
MAKELANGID
(
LANG_DUTCH
,
SUBLANG_DEFAULT
);
prop
.
id
=
WS_ERROR_PROPERTY_LANGID
;
prop
.
value
=
&
langid
;
prop
.
valueSize
=
sizeof
(
langid
);
hr
=
WsCreateError
(
&
prop
,
1
,
&
error
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
langid
=
0xdead
;
size
=
sizeof
(
langid
);
hr
=
WsGetErrorProperty
(
error
,
WS_ERROR_PROPERTY_LANGID
,
&
langid
,
size
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
langid
==
MAKELANGID
(
LANG_DUTCH
,
SUBLANG_DEFAULT
),
"got %u
\n
"
,
langid
);
WsFreeError
(
error
);
count
=
0xdeadbeef
;
prop
.
id
=
WS_ERROR_PROPERTY_LANGID
+
1
;
prop
.
value
=
&
count
;
prop
.
valueSize
=
sizeof
(
count
);
hr
=
WsCreateError
(
&
prop
,
1
,
&
error
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
}
START_TEST
(
reader
)
{
test_WsCreateError
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment