crypt32: use ret in compareStore() (try 2)

Austin English austinenglish at gmail.com
Sat May 22 03:51:32 CDT 2010


Set LastError and print it as a decimal.

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c
index cab74c6..72265df 100644
--- a/dlls/crypt32/tests/store.c
+++ b/dlls/crypt32/tests/store.c
@@ -2069,15 +2069,19 @@ static void compareStore(HCERTSTORE store, LPCSTR name, const BYTE *pb,
     BOOL ret;
     CRYPT_DATA_BLOB blob = { 0, NULL };
 
+    SetLastError(0xdeadbeef);
     ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE,
      CERT_STORE_SAVE_TO_MEMORY, &blob, 0);
+    todo_wine ok(ret && GetLastError() == CRYPT_E_NOT_FOUND, "CertSaveStore failed. Expected CRYPT_E_NOT_FOUND, got %d\n", GetLastError());
     ok(blob.cbData == cb, "%s: expected size %d, got %d\n", name, cb,
      blob.cbData);
     blob.pbData = HeapAlloc(GetProcessHeap(), 0, blob.cbData);
     if (blob.pbData)
     {
+        SetLastError(0xdeadbeef);
         ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE,
          CERT_STORE_SAVE_TO_MEMORY, &blob, 0);
+        todo_wine ok(ret && GetLastError() == CRYPT_E_NOT_FOUND, "CertSaveStore failed. Expected CRYPT_E_NOT_FOUND, got %d\n", GetLastError());
         ok(!memcmp(pb, blob.pbData, cb), "%s: unexpected value\n", name);
         HeapFree(GetProcessHeap(), 0, blob.pbData);
     }


More information about the wine-patches mailing list