From 1779c64ba09152ff568c9b553d8f5a50b58c8cd9 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Wed, 10 Sep 2008 22:59:43 -0500 Subject: [PATCH] crypt32: Fix a failing test in win9x. --- dlls/crypt32/tests/ctl.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dlls/crypt32/tests/ctl.c b/dlls/crypt32/tests/ctl.c index 799e9c9f6db..5ed4381d48c 100644 --- a/dlls/crypt32/tests/ctl.c +++ b/dlls/crypt32/tests/ctl.c @@ -359,10 +359,17 @@ static void testAddCTLToStore(void) signedCTLWithCTLInnerContentAndBadSig, sizeof(signedCTLWithCTLInnerContentAndBadSig), CERT_STORE_ADD_NEW, NULL); - ok(!ret && - (GetLastError() == CRYPT_E_EXISTS || - GetLastError() == CRYPT_E_NOT_FOUND), /* win9x */ - "expected CRYPT_E_EXISTS, got %d %08x\n", ret, GetLastError()); + if (ret) + { + /* win9x */ + ok(GetLastError() == CRYPT_E_NOT_FOUND, + "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + } + else + { + ok(!ret && GetLastError() == CRYPT_E_EXISTS, + "expected CRYPT_E_EXISTS, got %d %08x\n", ret, GetLastError()); + } CertCloseStore(store, 0); store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,