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
ba16113d
Commit
ba16113d
authored
Jun 19, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jun 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Add more database tests.
parent
2c4e5ad1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
1 deletion
+65
-1
database.c
dlls/oledb32/tests/database.c
+65
-1
No files found.
dlls/oledb32/tests/database.c
View file @
ba16113d
...
...
@@ -28,9 +28,14 @@
#include "msdadc.h"
#include "msdasc.h"
#include "shlobj.h"
#include "initguid.h"
#include "wine/test.h"
DEFINE_GUID
(
CSLID_MSDAER
,
0xc8b522cf
,
0x5cf3
,
0x11ce
,
0xad
,
0xe5
,
0x00
,
0xaa
,
0x00
,
0x44
,
0x77
,
0x3d
);
static
WCHAR
initstring_default
[]
=
{
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
';'
,
0
};
static
void
test_GetDataSource
(
WCHAR
*
initstring
)
{
IDataInitialize
*
datainit
=
NULL
;
...
...
@@ -96,7 +101,6 @@ static void test_database(void)
'J'
,
'e'
,
't'
,
'.'
,
'O'
,
'L'
,
'E'
,
'D'
,
'B'
,
'.'
,
'4'
,
'.'
,
'0'
,
';'
,
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
';'
,
'P'
,
'e'
,
'r'
,
's'
,
'i'
,
's'
,
't'
,
' '
,
'S'
,
'e'
,
'c'
,
'u'
,
'r'
,
'i'
,
't'
,
'y'
,
' '
,
'I'
,
'n'
,
'f'
,
'o'
,
'='
,
'F'
,
'a'
,
'l'
,
's'
,
'e'
,
';'
,
0
};
static
WCHAR
initstring_default
[]
=
{
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
';'
,
0
};
static
WCHAR
initstring_lower
[]
=
{
'd'
,
'a'
,
't'
,
'a'
,
' '
,
's'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
';'
,
0
};
IDataInitialize
*
datainit
=
NULL
;
HRESULT
hr
;
...
...
@@ -115,11 +119,71 @@ static void test_database(void)
test_GetDataSource
(
initstring_lower
);
}
static
void
test_errorinfo
(
void
)
{
HRESULT
hr
;
IUnknown
*
unk
=
NULL
;
hr
=
CoCreateInstance
(
&
CSLID_MSDAER
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
IErrorInfo
*
errorinfo
;
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IErrorInfo
,
(
void
**
)
&
errorinfo
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
IErrorInfo_Release
(
errorinfo
);
}
IUnknown_Release
(
unk
);
}
}
static
void
test_initializationstring
(
void
)
{
static
WCHAR
initstring_msdasql
[]
=
{
'P'
,
'r'
,
'o'
,
'v'
,
'i'
,
'd'
,
'e'
,
'r'
,
'='
,
'M'
,
'S'
,
'D'
,
'A'
,
'S'
,
'Q'
,
'L'
,
'.'
,
'1'
,
';'
,
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
0
};
static
WCHAR
initstring_sqloledb
[]
=
{
'P'
,
'r'
,
'o'
,
'v'
,
'i'
,
'd'
,
'e'
,
'r'
,
'='
,
'S'
,
'Q'
,
'L'
,
'O'
,
'L'
,
'E'
,
'D'
,
'B'
,
'.'
,
'1'
,
';'
,
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
0
};
IDataInitialize
*
datainit
=
NULL
;
IDBInitialize
*
dbinit
=
NULL
;
HRESULT
hr
;
WCHAR
*
initstring
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_MSDAINITIALIZE
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDataInitialize
,(
void
**
)
&
datainit
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDataInitialize_GetDataSource
(
datainit
,
NULL
,
CLSCTX_INPROC_SERVER
,
initstring_default
,
&
IID_IDBInitialize
,
(
IUnknown
**
)
&
dbinit
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDataInitialize_GetInitializationString
(
datainit
,
(
IUnknown
*
)
dbinit
,
0
,
&
initstring
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
trace
(
"Init String: %s
\n
"
,
wine_dbgstr_w
(
initstring
));
todo_wine
ok
(
!
lstrcmpW
(
initstring_msdasql
,
initstring
)
||
!
lstrcmpW
(
initstring_sqloledb
,
initstring
),
"got %s
\n
"
,
wine_dbgstr_w
(
initstring
));
CoTaskMemFree
(
initstring
);
}
IDBInitialize_Release
(
dbinit
);
}
IDataInitialize_Release
(
datainit
);
}
}
START_TEST
(
database
)
{
OleInitialize
(
NULL
);
test_database
();
test_errorinfo
();
test_initializationstring
();
OleUninitialize
();
}
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