Module: wine Branch: master Commit: a4fe05a0f3fc7cd3aa908b5f196e207b0766a430 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a4fe05a0f3fc7cd3aa908b5f19...
Author: Juan Lang juan.lang@gmail.com Date: Mon Jan 31 08:11:04 2011 -0800
crypt32/tests: Test some return values (clang).
---
dlls/crypt32/tests/cert.c | 1 + dlls/crypt32/tests/msg.c | 1 + dlls/crypt32/tests/store.c | 3 +++ 3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index d3b362c..9ee53fe 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -1514,6 +1514,7 @@ static void testGetIssuerCert(void) /* With only the child certificate, no issuer will be found */ ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, chain7_1, sizeof(chain7_1), CERT_STORE_ADD_ALWAYS, &child); + ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); ok(parent == NULL, "Expected no issuer\n"); /* Adding an issuer allows one (and only one) issuer to be found */ diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 77b468c..2e27c0f 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -3253,6 +3253,7 @@ static void test_msg_control(void) "Expected E_INVALIDARG, got %08x\n", GetLastError()); } ret = CryptMsgUpdate(msg, NULL, 0, TRUE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); /* or after an update. */ for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) { diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index c9103e9..b749719 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -1171,6 +1171,7 @@ static void testSystemStore(void) /* Now check whether deleting is allowed */ store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_DELETE_FLAG, BogusW); + ok(!store, "Didn't expect a store to be returned when deleting\n"); RegDeleteKeyW(HKEY_CURRENT_USER, BogusPathW); }
@@ -2243,6 +2244,8 @@ static void testAddCertificateLink(void) if (buf) { ret = CertSerializeCertificateStoreElement(linked, 0, buf, &size); + ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", + GetLastError()); /* The serialized linked certificate is identical to the serialized * original certificate. */