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
678f98ea
Commit
678f98ea
authored
Sep 09, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Sep 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32/tests: Add some tests for IDCInfo.
parent
93fa219b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
180 additions
and
0 deletions
+180
-0
.gitignore
.gitignore
+2
-0
configure
configure
+9
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/oledb32/tests/Makefile.in
+15
-0
convert.c
dlls/oledb32/tests/convert.c
+152
-0
convert.idl
dlls/oledb32/tests/convert.idl
+1
-0
No files found.
.gitignore
View file @
678f98ea
...
...
@@ -82,6 +82,8 @@ dlls/oleaut32/tests/tmarshal.tlb
dlls/oleaut32/tests/tmarshal_i.c
dlls/oledb32/convert.h
dlls/oledb32/convert_i.c
dlls/oledb32/tests/convert.h
dlls/oledb32/tests/convert_i.c
dlls/qmgr/qmgr_local.h
dlls/qmgr/qmgr_local_i.c
dlls/qmgrprxy/qmgrprxy.h
...
...
configure
View file @
678f98ea
...
...
@@ -15993,6 +15993,14 @@ dlls/oledb32/Makefile: dlls/oledb32/Makefile.in dlls/Makedll.rules"
ac_config_files
=
"
$ac_config_files
dlls/oledb32/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
dlls/oledb32/tests/Makefile"
test
"x
$enable_tests
"
!=
xno
&&
ALL_TEST_DIRS
=
"
$ALL_TEST_DIRS
\\
oledb32/tests"
ALL_MAKEFILE_DEPENDS
=
"
$ALL_MAKEFILE_DEPENDS
dlls/oledb32/tests/Makefile: dlls/oledb32/tests/Makefile.in dlls/Maketest.rules"
ac_config_files
=
"
$ac_config_files
dlls/oledb32/tests/Makefile"
ALL_MAKEFILES
=
"
$ALL_MAKEFILES
\\
dlls/oledlg/Makefile"
test
"x
$enable_oledlg
"
!=
xno
&&
ALL_DLL_DIRS
=
"
$ALL_DLL_DIRS
\\
oledlg"
...
...
@@ -18929,6 +18937,7 @@ do
"dlls/olecli.dll16/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/olecli.dll16/Makefile" ;;
"dlls/olecli32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/olecli32/Makefile" ;;
"dlls/oledb32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/oledb32/Makefile" ;;
"dlls/oledb32/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/oledb32/tests/Makefile" ;;
"dlls/oledlg/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/oledlg/Makefile" ;;
"dlls/olepro32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/olepro32/Makefile" ;;
"dlls/olesvr.dll16/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/olesvr.dll16/Makefile" ;;
...
...
configure.ac
View file @
678f98ea
...
...
@@ -2359,6 +2359,7 @@ WINE_CONFIG_MAKEFILE([dlls/oleaut32/tests/Makefile],[dlls/Maketest.rules],[dlls]
WINE_CONFIG_MAKEFILE([dlls/olecli.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16])
WINE_CONFIG_MAKEFILE([dlls/olecli32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/oledb32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/oledb32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/oledlg/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/olepro32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/olesvr.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16])
...
...
dlls/oledb32/tests/Makefile.in
0 → 100644
View file @
678f98ea
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
oledb32.dll
IMPORTS
=
ole32 gdi32 advapi32 kernel32
CTESTS
=
\
convert.c
IDL_I_SRCS
=
convert.idl
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/oledb32/tests/convert.c
0 → 100644
View file @
678f98ea
/* OLE DB Conversion library tests
*
* Copyright 2009 Huw Davies
*
* 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>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "msdadc.h"
#include "oledberr.h"
#include "initguid.h"
#include "msdaguid.h"
#include "wine/test.h"
static
void
test_dcinfo
(
void
)
{
IDCInfo
*
info
;
HRESULT
hr
;
DCINFOTYPE
types
[
2
];
DCINFO
*
inf
;
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_CONVERSIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDCInfo
,
(
void
**
)
&
info
);
if
(
FAILED
(
hr
))
{
win_skip
(
"Unable to load oledb conversion library
\n
"
);
return
;
}
types
[
0
]
=
DCINFOTYPE_VERSION
;
hr
=
IDCInfo_GetInfo
(
info
,
1
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
->
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
->
eInfoType
);
ok
(
V_VT
(
&
inf
->
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
->
vData
));
ok
(
V_UI4
(
&
inf
->
vData
)
==
0x110
,
"got %08x
\n
"
,
V_UI4
(
&
inf
->
vData
));
V_UI4
(
&
inf
->
vData
)
=
0x200
;
hr
=
IDCInfo_SetInfo
(
info
,
1
,
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
CoTaskMemFree
(
inf
);
hr
=
IDCInfo_GetInfo
(
info
,
1
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
->
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
->
eInfoType
);
ok
(
V_VT
(
&
inf
->
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
->
vData
));
ok
(
V_UI4
(
&
inf
->
vData
)
==
0x200
,
"got %08x
\n
"
,
V_UI4
(
&
inf
->
vData
));
V_UI4
(
&
inf
->
vData
)
=
0x100
;
hr
=
IDCInfo_SetInfo
(
info
,
1
,
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
CoTaskMemFree
(
inf
);
hr
=
IDCInfo_GetInfo
(
info
,
1
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
->
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
->
eInfoType
);
ok
(
V_VT
(
&
inf
->
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
->
vData
));
ok
(
V_UI4
(
&
inf
->
vData
)
==
0x100
,
"got %08x
\n
"
,
V_UI4
(
&
inf
->
vData
));
V_UI4
(
&
inf
->
vData
)
=
0x500
;
hr
=
IDCInfo_SetInfo
(
info
,
1
,
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
CoTaskMemFree
(
inf
);
hr
=
IDCInfo_GetInfo
(
info
,
1
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
->
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
->
eInfoType
);
ok
(
V_VT
(
&
inf
->
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
->
vData
));
ok
(
V_UI4
(
&
inf
->
vData
)
==
0x500
,
"got %08x
\n
"
,
V_UI4
(
&
inf
->
vData
));
V_UI4
(
&
inf
->
vData
)
=
0xffff
;
hr
=
IDCInfo_SetInfo
(
info
,
1
,
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
CoTaskMemFree
(
inf
);
hr
=
IDCInfo_GetInfo
(
info
,
1
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
->
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
->
eInfoType
);
ok
(
V_VT
(
&
inf
->
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
->
vData
));
ok
(
V_UI4
(
&
inf
->
vData
)
==
0xffff
,
"got %08x
\n
"
,
V_UI4
(
&
inf
->
vData
));
V_UI4
(
&
inf
->
vData
)
=
0x12345678
;
hr
=
IDCInfo_SetInfo
(
info
,
1
,
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
CoTaskMemFree
(
inf
);
hr
=
IDCInfo_GetInfo
(
info
,
1
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
->
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
->
eInfoType
);
ok
(
V_VT
(
&
inf
->
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
->
vData
));
ok
(
V_UI4
(
&
inf
->
vData
)
==
0x12345678
,
"got %08x
\n
"
,
V_UI4
(
&
inf
->
vData
));
/* Try setting a version variant of something other than VT_UI4 */
V_VT
(
&
inf
->
vData
)
=
VT_I4
;
V_I4
(
&
inf
->
vData
)
=
0x200
;
hr
=
IDCInfo_SetInfo
(
info
,
1
,
inf
);
ok
(
hr
==
DB_S_ERRORSOCCURRED
,
"got %08x
\n
"
,
hr
);
CoTaskMemFree
(
inf
);
hr
=
IDCInfo_GetInfo
(
info
,
1
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
->
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
->
eInfoType
);
ok
(
V_VT
(
&
inf
->
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
->
vData
));
ok
(
V_UI4
(
&
inf
->
vData
)
==
0x12345678
,
"got %08x
\n
"
,
V_UI4
(
&
inf
->
vData
));
CoTaskMemFree
(
inf
);
/* More than one type */
types
[
1
]
=
2
;
hr
=
IDCInfo_GetInfo
(
info
,
2
,
types
,
&
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
inf
[
0
].
eInfoType
==
DCINFOTYPE_VERSION
,
"got %08x
\n
"
,
inf
[
0
].
eInfoType
);
ok
(
V_VT
(
&
inf
[
0
].
vData
)
==
VT_UI4
,
"got %08x
\n
"
,
V_VT
(
&
inf
[
0
].
vData
));
ok
(
V_UI4
(
&
inf
[
0
].
vData
)
==
0x12345678
,
"got %08x
\n
"
,
V_UI4
(
&
inf
[
0
].
vData
));
ok
(
inf
[
1
].
eInfoType
==
2
,
"got %08x
\n
"
,
inf
[
1
].
eInfoType
);
ok
(
V_VT
(
&
inf
[
1
].
vData
)
==
VT_EMPTY
,
"got %08x
\n
"
,
V_VT
(
&
inf
[
1
].
vData
));
hr
=
IDCInfo_SetInfo
(
info
,
2
,
inf
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
CoTaskMemFree
(
inf
);
IDCInfo_Release
(
info
);
}
START_TEST
(
convert
)
{
OleInitialize
(
NULL
);
test_dcinfo
();
OleUninitialize
();
}
dlls/oledb32/tests/convert.idl
0 → 100644
View file @
678f98ea
#
include
"msdadc.idl"
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