André Hentschel : mscoree/tests: Test more IStream Functions on a ConfigStream.

Alexandre Julliard julliard at winehq.org
Mon Jun 6 15:19:09 CDT 2011


Module: wine
Branch: master
Commit: 2061c61c4e8a00d7ea11c9a4961fb738efe0e58a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2061c61c4e8a00d7ea11c9a4961fb738efe0e58a

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sat Jun  4 18:35:09 2011 +0200

mscoree/tests: Test more IStream Functions on a ConfigStream.

---

 dlls/mscoree/tests/mscoree.c |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c
index 3ef9bd8..3731f6f 100644
--- a/dlls/mscoree/tests/mscoree.c
+++ b/dlls/mscoree/tests/mscoree.c
@@ -274,7 +274,6 @@ static void test_createconfigstream(void)
     WCHAR nonexistent[] = {'n', 'o', 'n', 'e', 'x', 'i', 's', 't', '.', 'x', 'm', 'l', 0};
     WCHAR path[MAX_PATH];
     HRESULT hr;
-    ULONG ret;
     char buffer[256] = {0};
 
     if (!pCreateConfigStream)
@@ -308,14 +307,37 @@ static void test_createconfigstream(void)
     if (stream)
     {
         DWORD count;
+        LARGE_INTEGER pos;
+        ULARGE_INTEGER size;
+        IStream *stream2 = NULL;
 
-        hr = IStream_Read(stream, &buffer, strlen(xmldata), &count);
+        hr = IStream_Read(stream, buffer, strlen(xmldata), &count);
         ok(hr == S_OK, "IStream_Read failed, hr=%x\n", hr);
         ok(count == strlen(xmldata), "wrong count: %u\n", count);
         ok(!strcmp(buffer, xmldata), "Strings do not match\n");
 
-        ret = IStream_Release(stream);
-        ok(!ret, "ret=%d\n", ret);
+        hr = IStream_Write(stream, xmldata, strlen(xmldata), &count);
+        ok(hr == E_FAIL, "IStream_Write returned hr=%x\n", hr);
+
+        pos.QuadPart = strlen(xmldata);
+        hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL);
+        ok(hr == E_NOTIMPL, "IStream_Seek returned hr=%x\n", hr);
+
+        size.QuadPart = strlen(xmldata);
+        hr = IStream_SetSize(stream, size);
+        ok(hr == E_NOTIMPL, "IStream_SetSize returned hr=%x\n", hr);
+
+        hr = IStream_Clone(stream, &stream2);
+        ok(hr == E_NOTIMPL, "IStream_Clone returned hr=%x\n", hr);
+
+        hr = IStream_Commit(stream, STGC_DEFAULT);
+        ok(hr == E_NOTIMPL, "IStream_Commit returned hr=%x\n", hr);
+
+        hr = IStream_Revert(stream);
+        ok(hr == E_NOTIMPL, "IStream_Revert returned hr=%x\n", hr);
+
+        hr = IStream_Release(stream);
+        ok(hr == S_OK, "IStream_Release returned hr=%x\n", hr);
     }
     DeleteFileW(file);
 }




More information about the wine-cvs mailing list