Nikolay Sivov : ole32/tests: Test default item moniker instance.

Alexandre Julliard julliard at winehq.org
Tue Jan 28 15:35:25 CST 2020


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Jan 28 10:32:18 2020 +0300

ole32/tests: Test default item moniker instance.

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

---

 dlls/ole32/tests/moniker.c | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c
index bec5c76caa..8b150738b2 100644
--- a/dlls/ole32/tests/moniker.c
+++ b/dlls/ole32/tests/moniker.c
@@ -1311,6 +1311,13 @@ static const BYTE expected_item_moniker_comparison_data5[] =
       'S',0x00, 'T',0x00,0x00,0x00,
 };
 
+static const BYTE expected_item_moniker_comparison_data6[] =
+{
+     0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
+     0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
+     0x00,0x00,
+};
+
 static const BYTE expected_item_moniker_saved_data[] =
 {
      0x02,0x00,0x00,0x00, '!',0x00,0x05,0x00,
@@ -1341,6 +1348,12 @@ static const BYTE expected_item_moniker_saved_data5[] =
      0x00,0x00,0x00, 'T', 'e', 's', 't',0x00,
 };
 
+static const BYTE expected_item_moniker_saved_data6[] =
+{
+     0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+     0x00,0x00,
+};
+
 static const BYTE expected_item_moniker_marshal_data[] =
 {
      0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
@@ -1401,6 +1414,18 @@ static const BYTE expected_item_moniker_marshal_data5[] =
      0x00,0x00,0x00, 'T', 'e', 's', 't',0x00,
 };
 
+static const BYTE expected_item_moniker_marshal_data6[] =
+{
+     0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
+     0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
+     0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
+     0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46,
+     0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
+     0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,
+     0x00,0x00,
+};
+
 static const BYTE expected_anti_moniker_marshal_data[] =
 {
     0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00,
@@ -2239,6 +2264,18 @@ todo_wine
         IMoniker_Release(moniker);
         IMoniker_Release(moniker2);
     }
+
+    /* Default instance. */
+    hr = CoCreateInstance(&CLSID_ItemMoniker, NULL, CLSCTX_SERVER, &IID_IMoniker, (void **)&moniker);
+    ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr);
+
+    test_moniker("item moniker 6", moniker,
+        expected_item_moniker_marshal_data6, sizeof(expected_item_moniker_marshal_data6),
+        expected_item_moniker_saved_data6, sizeof(expected_item_moniker_saved_data6),
+        expected_item_moniker_comparison_data6, sizeof(expected_item_moniker_comparison_data6),
+        34, L"");
+
+    IMoniker_Release(moniker);
 }
 
 static void stream_write_dword(IStream *stream, DWORD value)




More information about the wine-cvs mailing list