crypt32/tests: make sure to use return value (LLVM/Clang)

Austin English austinenglish at gmail.com
Fri Feb 4 18:06:38 CST 2011


-- 
-Austin
-------------- next part --------------
diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c
index dd85be4..39fa2e1 100644
--- a/dlls/crypt32/tests/base64.c
+++ b/dlls/crypt32/tests/base64.c
@@ -151,6 +151,7 @@ static void testBinaryToStringA(void)
 
             ret = pCryptBinaryToStringA(tests[i].toEncode, tests[i].toEncodeLen,
              CRYPT_STRING_BINARY, str, &strLen2);
+            ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError());
             ok(strLen == strLen2, "Expected length %d, got %d\n", strLen,
              strLen2);
             ok(!memcmp(str, tests[i].toEncode, tests[i].toEncodeLen),
@@ -187,6 +188,7 @@ static void testBinaryToStringA(void)
             ret = pCryptBinaryToStringA(testsNoCR[i].toEncode,
              testsNoCR[i].toEncodeLen, CRYPT_STRING_BINARY | CRYPT_STRING_NOCR,
              str, &strLen2);
+            ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError());
             ok(strLen == strLen2, "Expected length %d, got %d\n", strLen,
              strLen2);
             ok(!memcmp(str, testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen),
@@ -287,6 +289,7 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header,
 
                 ret = pCryptStringToBinaryA(str, 0, useFormat, buf, &bufLen,
                  &skipped, &usedFormat);
+                ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError());
                 ok(skipped == strlen(garbage),
                  "Expected %d characters of \"%s\" skipped when trying format %08x, got %d (used format is %08x)\n",
                  lstrlenA(garbage), str, useFormat, skipped, usedFormat);


More information about the wine-patches mailing list