Module: wine Branch: refs/heads/master Commit: b40a406dc37ea7e7188a705454fd81e89b095f87 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b40a406dc37ea7e7188a7054...
Author: Juan Lang juan_lang@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);