@@ -27,11 +27,11 @@ #import "TestsAppDelegate.h" static OFString *module = @"OFMD5Hash"; -const uint8_t testfile_md5[OF_MD5_DIGEST_SIZE] = +const uint8_t testfile_md5[16] = "\x00\x8B\x9D\x1B\x58\xDF\xF8\xFE\xEE\xF3\xAE\x8D\xBB\x68\x2D\x38"; @implementation TestsAppDelegate (OFMD5HashTests) - (void)MD5HashTests { @@ -49,16 +49,15 @@ [md5 updateWithBuffer: buf length: len]; } [f close]; - TEST(@"-[digest]", - !memcmp([md5 digest], testfile_md5, OF_MD5_DIGEST_SIZE)) + TEST(@"-[digest]", !memcmp([md5 digest], testfile_md5, 16)) EXPECT_EXCEPTION(@"Detect invalid call of " @"-[updateWithBuffer:length]", OFHashAlreadyCalculatedException, [md5 updateWithBuffer: "" length: 1]) [pool drain]; } @end