Hans Leidekker : advapi32: Remove tests for the sha context structure.

Alexandre Julliard julliard at winehq.org
Tue Oct 23 13:14:31 CDT 2007


Module: wine
Branch: master
Commit: 35c0511d2b7daa8a25bc3bf97edf1f515623e9eb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=35c0511d2b7daa8a25bc3bf97edf1f515623e9eb

Author: Hans Leidekker <hans at it.vu.nl>
Date:   Mon Oct 22 16:32:36 2007 +0200

advapi32: Remove tests for the sha context structure.

---

 dlls/advapi32/tests/crypt_sha.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/dlls/advapi32/tests/crypt_sha.c b/dlls/advapi32/tests/crypt_sha.c
index e8cd557..cfdaf99 100644
--- a/dlls/advapi32/tests/crypt_sha.c
+++ b/dlls/advapi32/tests/crypt_sha.c
@@ -33,8 +33,6 @@ typedef struct {
    UCHAR Buffer[64];
 } SHA_CTX, *PSHA_CTX;
 
-#define ctxcmp(a,b) memcmp((char*)a, (char*)b, FIELD_OFFSET(SHA_CTX, Buffer))
-
 static void test_sha_ctx(void)
 {
    FARPROC pA_SHAInit, pA_SHAUpdate, pA_SHAFinal;
@@ -45,9 +43,6 @@ static void test_sha_ctx(void)
    ULONG test_buffer_size = strlen(test_buffer);
    HMODULE hmod;
    SHA_CTX ctx;
-   SHA_CTX ctx_initialized = {{0, 0, 0, 0, 0}, {0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0}, {0, 0}};
-   SHA_CTX ctx_update1 = {{0, 0, 0, 0, 0}, {0xdbe5eba8, 0x6b4335ca, 0xf7c94abe, 0xc9f34e31, 0x311023f0}, {0, 0x67}};
-   SHA_CTX ctx_update2 = {{0, 0, 0, 0, 0}, {0x5ecc818d, 0x52498169, 0xf6758559, 0xd035a164, 0x871dd125}, {0, 0xce}};
    ULONG result[5];
    ULONG result_correct[5] = {0xe014f93, 0xe09791ec, 0x6dcf96c8, 0x8e9385fc, 0x1611c1bb};
 
@@ -64,16 +59,9 @@ static void test_sha_ctx(void)
 
    RtlZeroMemory(&ctx, sizeof(ctx));
    pA_SHAInit(&ctx);
-   ok(!ctxcmp(&ctx, &ctx_initialized), "invalid initialization\n");
-
    pA_SHAUpdate(&ctx, test_buffer, test_buffer_size);
-   ok(!ctxcmp(&ctx, &ctx_update1), "update doesn't work correctly\n");
-
    pA_SHAUpdate(&ctx, test_buffer, test_buffer_size);
-   ok(!ctxcmp(&ctx, &ctx_update2), "update doesn't work correctly\n");
-
    pA_SHAFinal(&ctx, result);
-   ok(!ctxcmp(&ctx, &ctx_initialized), "context hasn't been reinitialized\n");
    ok(!memcmp(result, result_correct, sizeof(result)), "incorrect result\n");
 }
 




More information about the wine-cvs mailing list