Juan Lang : crypt32: Tighten CertDuplicateCertificateContext test.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 16 14:40:54 CST 2006
Module: wine
Branch: refs/heads/master
Commit: b40a406dc37ea7e7188a705454fd81e89b095f87
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b40a406dc37ea7e7188a705454fd81e89b095f87
Author: Juan Lang <juan_lang at yahoo.com>
Date: Wed Mar 15 09:58:59 2006 -0800
crypt32: Tighten CertDuplicateCertificateContext test.
Test that the return from CertDuplicateCertificateContext is the same
as its parameter.
---
dlls/crypt32/tests/store.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c
index 2ca59b8..c147afb 100644
--- a/dlls/crypt32/tests/store.c
+++ b/dlls/crypt32/tests/store.c
@@ -143,17 +143,11 @@ static void testDupCert(void)
dupContext = CertDuplicateCertificateContext(context);
ok(dupContext != NULL, "Expected valid duplicate\n");
- if (dupContext)
- {
- ok(dupContext->cbCertEncoded == sizeof(bigCert),
- "Expected cert of %d bytes, got %ld\n", sizeof(bigCert),
- dupContext->cbCertEncoded);
- ok(!memcmp(dupContext->pbCertEncoded, bigCert,
- sizeof(bigCert)),
- "Unexpected encoded cert in context\n");
- ok(dupContext->hCertStore == store, "Unexpected store\n");
- CertFreeCertificateContext(dupContext);
- }
+ /* Not only is it a duplicate, it's identical: the address is the
+ * same.
+ */
+ ok(dupContext == context, "Expected identical context addresses\n");
+ CertFreeCertificateContext(dupContext);
CertFreeCertificateContext(context);
}
CertCloseStore(store, 0);
More information about the wine-cvs
mailing list