Commit b624e812 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Fix the OLE clipboard test to call OleInitialize before performing the…

ole32: Fix the OLE clipboard test to call OleInitialize before performing the tests to fix test failures on Windows.
parent a45a2e37
...@@ -119,8 +119,10 @@ static HRESULT WINAPI EnumFormatImpl_Skip(IEnumFORMATETC *iface, ULONG celt) ...@@ -119,8 +119,10 @@ static HRESULT WINAPI EnumFormatImpl_Skip(IEnumFORMATETC *iface, ULONG celt)
static HRESULT WINAPI EnumFormatImpl_Reset(IEnumFORMATETC *iface) static HRESULT WINAPI EnumFormatImpl_Reset(IEnumFORMATETC *iface)
{ {
ok(0, "unexpected call\n"); EnumFormatImpl *This = (EnumFormatImpl*)iface;
return E_NOTIMPL;
This->cur = 0;
return S_OK;
} }
static HRESULT WINAPI EnumFormatImpl_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum) static HRESULT WINAPI EnumFormatImpl_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum)
...@@ -329,6 +331,19 @@ static void test_set_clipboard(void) ...@@ -329,6 +331,19 @@ static void test_set_clipboard(void)
return; return;
hr = OleSetClipboard(data1); hr = OleSetClipboard(data1);
todo_wine
ok(hr == CO_E_NOTINITIALIZED, "OleSetClipboard should have failed with CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
CoInitialize(NULL);
hr = OleSetClipboard(data1);
todo_wine
ok(hr == CO_E_NOTINITIALIZED, "OleSetClipboard should have failed with CO_E_NOTINITIALIZED instead of 0x%08x\n", hr);
CoUninitialize();
hr = OleInitialize(NULL);
ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr);
hr = OleSetClipboard(data1);
ok(hr == S_OK, "failed to set clipboard to data1, hr = 0x%08x\n", hr); ok(hr == S_OK, "failed to set clipboard to data1, hr = 0x%08x\n", hr);
hr = OleIsCurrentClipboard(data1); hr = OleIsCurrentClipboard(data1);
ok(hr == S_OK, "expected current clipboard to be data1, hr = 0x%08x\n", hr); ok(hr == S_OK, "expected current clipboard to be data1, hr = 0x%08x\n", hr);
...@@ -355,6 +370,8 @@ static void test_set_clipboard(void) ...@@ -355,6 +370,8 @@ static void test_set_clipboard(void)
ok(ref == 0, "expected data1 ref=0, got %d\n", ref); ok(ref == 0, "expected data1 ref=0, got %d\n", ref);
ref = IDataObject_Release(data2); ref = IDataObject_Release(data2);
ok(ref == 0, "expected data2 ref=0, got %d\n", ref); ok(ref == 0, "expected data2 ref=0, got %d\n", ref);
OleUninitialize();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment