Module: wine
Branch: master
Commit: a50fc2cc16ea6c48d5044f059c6d5d7a8e80567a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a50fc2cc16ea6c48d5044f059…
Author: James Hawkins <jhawkins(a)codeweavers.com>
Date: Thu Aug 28 21:20:09 2008 -0500
crypt32: Split the test for ret and last error up.
---
dlls/crypt32/tests/encode.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c
index 107ed3d..2b2119c 100644
--- a/dlls/crypt32/tests/encode.c
+++ b/dlls/crypt32/tests/encode.c
@@ -6387,8 +6387,9 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding)
SetLastError(0xdeadbeef);
ret = CryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info,
CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size);
- ok(!ret && GetLastError() == E_INVALIDARG,
- "Expected E_INVALIDARG, got %08x\n", GetLastError());
+ ok(!ret, "Expected failure, got %d\n", ret);
+ ok(GetLastError() == E_INVALIDARG,
+ "Expected E_INVALIDARG, got %08x\n", GetLastError());
/* To be encoded, a signer must have a valid cert ID, where a valid ID may
* be a key id or a issuer serial number with at least the issuer set, and
* the encoding must include PKCS_7_ASN_ENCODING.