Rob Shearman : ole32: Output the HRESULT for clipboard tests that
fail.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Dec 28 07:40:19 CST 2006
Module: wine
Branch: master
Commit: 3e8adc3d26b842f27dd6b36643bb3a443e26d12f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e8adc3d26b842f27dd6b36643bb3a443e26d12f
Author: Rob Shearman <rob at codeweavers.com>
Date: Wed Dec 27 19:14:34 2006 +0000
ole32: Output the HRESULT for clipboard tests that fail.
---
dlls/ole32/tests/clipboard.c | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index f2a71e4..165863d 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -320,27 +320,36 @@ static void test_set_clipboard(void)
ULONG ref;
LPDATAOBJECT data1, data2;
hr = DataObjectImpl_CreateText("data1", &data1);
- ok(SUCCEEDED(hr), "Failed to create data1 object: %d\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create data1 object: 0x%08x\n", hr);
if(FAILED(hr))
return;
hr = DataObjectImpl_CreateText("data2", &data2);
- ok(SUCCEEDED(hr), "Failed to create data2 object: %d\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create data2 object: 0x%08x\n", hr);
if(FAILED(hr))
return;
- ok(OleSetClipboard(data1) == S_OK, "failed to set clipboard to data1\n");
- ok(OleIsCurrentClipboard(data1) == S_OK, "expected current clipboard to be data1\n");
- ok(OleIsCurrentClipboard(data2) == S_FALSE, "did not expect current clipboard to be data2\n");
-
- ok(OleSetClipboard(data2) == S_OK, "failed to set clipboard to data2\n");
- ok(OleIsCurrentClipboard(data1) == S_FALSE, "did not expect current clipboard to be data1\n");
- ok(OleIsCurrentClipboard(data2) == S_OK, "expected current clipboard to be data2\n");
-
- ok(OleFlushClipboard() == S_OK, "failed to flush clipboard\n");
- ok(OleIsCurrentClipboard(data1) == S_FALSE, "did not expect current clipboard to be data1\n");
- ok(OleIsCurrentClipboard(data2) == S_FALSE, "did not expect current clipboard to be data2\n");
-
- ok(OleSetClipboard(NULL) == S_OK, "failed to clear clipboard\n");
+ hr = OleSetClipboard(data1);
+ ok(hr == S_OK, "failed to set clipboard to data1, hr = 0x%08x\n", hr);
+ hr = OleIsCurrentClipboard(data1);
+ ok(hr == S_OK, "expected current clipboard to be data1, hr = 0x%08x\n", hr);
+ hr = OleIsCurrentClipboard(data2);
+ ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr);
+
+ hr = OleSetClipboard(data2);
+ ok(hr == S_OK, "failed to set clipboard to data2, hr = 0x%08x\n", hr);
+ hr = OleIsCurrentClipboard(data1);
+ ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08x\n", hr);
+ hr = OleIsCurrentClipboard(data2);
+ ok(hr == S_OK, "expected current clipboard to be data2, hr = 0x%08x\n", hr);
+
+ hr = OleFlushClipboard();
+ ok(hr == S_OK, "failed to flush clipboard, hr = 0x%08x\n", hr);
+ hr = OleIsCurrentClipboard(data1);
+ ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08x\n", hr);
+ hr = OleIsCurrentClipboard(data2);
+ ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr);
+
+ ok(OleSetClipboard(NULL) == S_OK, "failed to clear clipboard, hr = 0x%08x\n", hr);
ref = IDataObject_Release(data1);
ok(ref == 0, "expected data1 ref=0, got %d\n", ref);
More information about the wine-cvs
mailing list