Nikolay Sivov : wbemprox/tests: Add a simple test for semi-synchronous mode behaviour.

Alexandre Julliard julliard at winehq.org
Mon Feb 18 15:43:30 CST 2019


Module: wine
Branch: master
Commit: 7e55129b7a652be643f97701e7ba5220a9ccb3a7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7e55129b7a652be643f97701e7ba5220a9ccb3a7

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Feb 15 20:04:52 2019 +0300

wbemprox/tests: Add a simple test for semi-synchronous mode behaviour.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wbemprox/tests/query.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index ae0106a..e8ddbcc 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -1084,6 +1084,34 @@ static void test_query_async( IWbemServices *services )
     SysFreeString( query );
 }
 
+static void test_query_semisync( IWbemServices *services )
+{
+    static const WCHAR queryW[] =
+        {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_','D','u','m','m','y',0};
+    BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+    IEnumWbemClassObject *result;
+    IWbemClassObject *obj;
+    ULONG count;
+    HRESULT hr;
+
+    hr = IWbemServices_ExecQuery( services, wql, query, WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY,
+            NULL, &result );
+    ok( hr == S_OK, "got %08x\n", hr );
+
+    count = 1;
+    obj = (void *)0xdeadbeef;
+    hr = IEnumWbemClassObject_Next( result, -1, 1, &obj, &count );
+todo_wine
+    ok( hr == WBEM_E_INVALID_CLASS, "Unexpected hr %#x.\n", hr );
+    ok( count == 0, "Unexpected count %u.\n", count );
+    ok( obj == (void *)0xdeadbeef, "Got object %p\n", obj );
+
+    IEnumWbemClassObject_Release( result );
+
+    SysFreeString( wql );
+    SysFreeString( query );
+}
+
 static void test_GetNames( IWbemServices *services )
 {
     static const WCHAR queryW[] =
@@ -1950,6 +1978,7 @@ START_TEST(query)
     test_StdRegProv( services );
     test_notification_query_async( services );
     test_query_async( services );
+    test_query_semisync( services );
     test_GetNames( services );
     test_SystemSecurity( services );
     test_Win32_OperatingSystem( services );




More information about the wine-cvs mailing list