Paul Vriens : fusion/tests: Skip tests on .NET 1.1.

Alexandre Julliard julliard at winehq.org
Mon Feb 9 10:29:53 CST 2009


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

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Mon Feb  9 13:39:37 2009 +0100

fusion/tests: Skip tests on .NET 1.1.

---

 dlls/fusion/tests/asmcache.c |   29 +++++++++++++++++++++++++++++
 include/corerror.h           |    2 ++
 2 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c
index 4c36a63..58aadf4 100644
--- a/dlls/fusion/tests/asmcache.c
+++ b/dlls/fusion/tests/asmcache.c
@@ -835,6 +835,32 @@ static void create_assembly(LPCSTR file)
     CloseHandle(hfile);
 }
 
+static BOOL check_dotnet20(void)
+{
+    IAssemblyCache *cache;
+    HRESULT hr;
+    BOOL ret = FALSE;
+
+    static const WCHAR winedll[] = {'w','i','n','e','.','d','l','l',0};
+
+    create_assembly("wine.dll");
+
+    hr = pCreateAssemblyCache(&cache, 0);
+    ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+
+    hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL);
+    if (hr == S_OK)
+        ret = TRUE;
+    else if (hr == CLDB_E_FILE_OLDVER)
+        win_skip("Tests can't be run on older .NET version (.NET 1.1)\n");
+    else
+        ok(0, "Expected S_OK, got %08x\n", hr);
+
+    DeleteFileA("wine.dll");
+    IAssemblyCache_Release(cache);
+    return ret;
+}
+
 static void test_CreateAssemblyCache(void)
 {
     IAssemblyCache *cache;
@@ -1464,6 +1490,9 @@ START_TEST(asmcache)
     if (!init_functionpointers())
         return;
 
+    if (!check_dotnet20())
+        return;
+
     test_CreateAssemblyCache();
     test_InstallAssembly();
     test_QueryAssemblyInfo();
diff --git a/include/corerror.h b/include/corerror.h
index 8a04699..892fc28 100644
--- a/include/corerror.h
+++ b/include/corerror.h
@@ -121,4 +121,6 @@
 
 #define FUSION_E_INVALID_NAME           EMAKEHR(0x1047)
 
+#define CLDB_E_FILE_OLDVER              EMAKEHR(0x1107)
+
 #endif	/* __WINE_CORERROR_H */




More information about the wine-cvs mailing list