Huw Davies : inetcomm/tests: Tests for IMimeInternational_ConvertBuffer.
Alexandre Julliard
julliard at winehq.org
Tue Sep 16 06:54:13 CDT 2008
Module: wine
Branch: master
Commit: 4c7380b113306ccc07511cdfdfe13cd5d2fce549
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c7380b113306ccc07511cdfdfe13cd5d2fce549
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Sep 15 12:40:22 2008 +0100
inetcomm/tests: Tests for IMimeInternational_ConvertBuffer.
---
dlls/inetcomm/tests/mimeintl.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/dlls/inetcomm/tests/mimeintl.c b/dlls/inetcomm/tests/mimeintl.c
index 0fc514f..0de56b2 100644
--- a/dlls/inetcomm/tests/mimeintl.c
+++ b/dlls/inetcomm/tests/mimeintl.c
@@ -210,11 +210,41 @@ static void test_defaultcharset(void)
IMimeInternational_Release(internat);
}
+static void test_convert(void)
+{
+ IMimeInternational *internat;
+ HRESULT hr;
+ BLOB src, dst;
+ ULONG read;
+ static const char test_string[] = "test string";
+
+ hr = MimeOleGetInternat(&internat);
+ ok(hr == S_OK, "ret %08x\n", hr);
+
+ src.pBlobData = (BYTE*)test_string;
+ src.cbSize = sizeof(test_string);
+ hr = IMimeInternational_ConvertBuffer(internat, 1252, 28591, &src, &dst, &read);
+ ok(hr == S_OK, "ret %08x\n", hr);
+ ok(read == sizeof(test_string), "got %d\n", read);
+ ok(dst.cbSize == sizeof(test_string), "got %d\n", dst.cbSize);
+ CoTaskMemFree(dst.pBlobData);
+
+ src.cbSize = 2;
+ hr = IMimeInternational_ConvertBuffer(internat, 1252, 28591, &src, &dst, &read);
+ ok(hr == S_OK, "ret %08x\n", hr);
+ ok(read == 2, "got %d\n", read);
+ ok(dst.cbSize == 2, "got %d\n", dst.cbSize);
+ CoTaskMemFree(dst.pBlobData);
+
+ IMimeInternational_Release(internat);
+}
+
START_TEST(mimeintl)
{
OleInitialize(NULL);
test_create();
test_charset();
test_defaultcharset();
+ test_convert();
OleUninitialize();
}
More information about the wine-cvs
mailing list