crypt32/tests: Tidy up unexpected length failure messages in base64.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jeff Smith 2019-10-09 12:53:53 -05:00 committed by Alexandre Julliard
parent db07ff83b3
commit 6cbedfa65b
1 changed files with 4 additions and 4 deletions

View File

@ -121,12 +121,12 @@ static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen,
strLen2 = strLen; strLen2 = strLen;
ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2); ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2);
ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError());
ok(strLen == strLen2, "Unexpected required length.\n"); ok(strLen == strLen2, "Unexpected required length %u, expected %u.\n", strLen2, strLen);
strLen2 = strLen - 1; strLen2 = strLen - 1;
ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2); ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2);
ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError());
ok(strLen == strLen2, "Unexpected required length.\n"); ok(strLen == strLen2, "Unexpected required length %u, expected %u.\n", strLen2, strLen);
str = heap_alloc(strLen); str = heap_alloc(strLen);
@ -137,7 +137,7 @@ static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen,
todo_wine todo_wine
ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringA failed %d, error %d.\n", ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringA failed %d, error %d.\n",
ret, GetLastError()); ret, GetLastError());
ok(strLen2 == strLen || broken(strLen2 == strLen - 1), "Expected length %d, got %d\n", strLen - 1, strLen); ok(strLen2 == strLen || broken(strLen2 == strLen - 1), "Expected length %d, got %d\n", strLen, strLen2);
todo_wine { todo_wine {
if (header) if (header)
ok(str[0] == header[0], "Unexpected buffer contents %#x.\n", str[0]); ok(str[0] == header[0], "Unexpected buffer contents %#x.\n", str[0]);
@ -147,7 +147,7 @@ todo_wine {
strLen2 = strLen; strLen2 = strLen;
ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, str, &strLen2); ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, str, &strLen2);
ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError());
ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", strLen - 1, strLen); ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", strLen - 1, strLen2);
ptr = str; ptr = str;
if (header) if (header)