Alistair Leslie-Hughes : oledb32/tests: Add MSDASQL Enumerator tests.
Alexandre Julliard
julliard at winehq.org
Wed Mar 18 15:42:01 CDT 2020
Module: wine
Branch: master
Commit: b1de215858eca0a79053eaba7ef652c58a518370
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b1de215858eca0a79053eaba7ef652c58a518370
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Wed Mar 18 05:26:06 2020 +0000
oledb32/tests: Add MSDASQL Enumerator tests.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/oledb32/tests/database.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c
index d9811043a8..c2b7e0598d 100644
--- a/dlls/oledb32/tests/database.c
+++ b/dlls/oledb32/tests/database.c
@@ -1049,6 +1049,42 @@ static void test_odbc_provider(void)
IDBProperties_Release(props);
}
+static void test_odbc_enumerator(void)
+{
+ HRESULT hr;
+ ISourcesRowset *source;
+ IRowset *rowset;
+
+ hr = CoCreateInstance( &CLSID_MSDASQL_ENUMERATOR, NULL, CLSCTX_ALL, &IID_ISourcesRowset, (void **)&source);
+ todo_wine ok(hr == S_OK, "Failed to create object 0x%08x\n", hr);
+ if (FAILED(hr))
+ {
+ return;
+ }
+
+ hr = ISourcesRowset_GetSourcesRowset(source, NULL, &IID_IRowset, 0, 0, (IUnknown**)&rowset);
+ todo_wine ok(hr == S_OK, "Failed to create object 0x%08x\n", hr);
+ if (hr == S_OK)
+ {
+ IAccessor *accessor;
+ IRowsetInfo *info;
+
+ hr = IRowset_QueryInterface(rowset, &IID_IAccessor, (void **)&accessor);
+ ok(hr == S_OK, "got %08x\n", hr);
+ if (hr == S_OK)
+ IAccessor_Release(accessor);
+
+ hr = IRowset_QueryInterface(rowset, &IID_IRowsetInfo, (void **)&info);
+ ok(hr == S_OK, "got %08x\n", hr);
+ if (hr == S_OK)
+ IRowsetInfo_Release(info);
+
+ IRowset_Release(rowset);
+ }
+
+ ISourcesRowset_Release(source);
+}
+
START_TEST(database)
{
OleInitialize(NULL);
@@ -1058,6 +1094,7 @@ START_TEST(database)
test_initializationstring();
test_dslocator();
test_odbc_provider();
+ test_odbc_enumerator();
/* row position */
test_rowposition();
More information about the wine-cvs
mailing list