@@ -27,11 +27,11 @@ #import "TestsAppDelegate.h" static OFString *module = @"OFHash"; -const uint8_t testfile_sha1[OF_SHA1_DIGEST_SIZE] = +const uint8_t testfile_sha1[20] = "\xC9\x9A\xB8\x7E\x1E\xC8\xEC\x65\xD5\xEB\xE4\x2E\x0D\xA6\x80\x96\xF5" "\x94\xE7\x17"; @implementation TestsAppDelegate (SHA1HashTests) - (void)SHA1HashTests @@ -50,16 +50,15 @@ [sha1 updateWithBuffer: buf length: len]; } [f close]; - TEST(@"-[digest]", - !memcmp([sha1 digest], testfile_sha1, OF_SHA1_DIGEST_SIZE)) + TEST(@"-[digest]", !memcmp([sha1 digest], testfile_sha1, 20)) EXPECT_EXCEPTION(@"Detect invalid call of " @"-[updateWithBuffer:length:]", OFHashAlreadyCalculatedException, [sha1 updateWithBuffer: "" length: 1]) [pool drain]; } @end