Hans Leidekker : fusion/tests: Add a test for IAssemblyCache:: QueryAssemblyInfo.

Alexandre Julliard julliard at winehq.org
Tue Jan 10 13:11:21 CST 2012


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Jan 10 16:53:58 2012 +0100

fusion/tests: Add a test for IAssemblyCache::QueryAssemblyInfo.

---

 dlls/fusion/tests/asmcache.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c
index 900d23a..46c1db9 100644
--- a/dlls/fusion/tests/asmcache.c
+++ b/dlls/fusion/tests/asmcache.c
@@ -1306,7 +1306,7 @@ static void test_QueryAssemblyInfo(void)
     ok(info.cchBuf == lstrlenW(asmpath) + 1,
        "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf);
 
-    /* short buffer */
+    /* short buffer, QUERYASMINFO_FLAG_VALIDATE */
     memset(&info, 0, sizeof(info));
     lstrcpyW(name, wine);
     lstrcatW(name, commasep);
@@ -1316,6 +1316,16 @@ static void test_QueryAssemblyInfo(void)
     ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "got %08x\n", hr);
     ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n", info.dwAssemblyFlags);
 
+    /* short buffer, QUERYASMINFO_FLAG_GETSIZE */
+    memset(&info, 0, sizeof(info));
+    lstrcpyW(name, wine);
+    lstrcatW(name, commasep);
+    lstrcatW(name, otherver);
+    hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE,
+                                          name, &info);
+    ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "got %08x\n", hr);
+    ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, "got %08x\n", info.dwAssemblyFlags);
+
     /* display name is "wine, Version=1.0.0.00000" */
     INIT_ASM_INFO();
     hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE,




More information about the wine-cvs mailing list