@@ -34,11 +34,11 @@ OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"r"]; TEST(@"+[cryptoHash]", (md5 = [OFMD5Hash cryptoHash])) - while (![f isAtEndOfStream]) { + while (!f.atEndOfStream) { char buf[64]; size_t len = [f readIntoBuffer: buf length: 64]; [md5 updateWithBuffer: buf length: len]; @@ -46,16 +46,16 @@ [f close]; TEST(@"-[copy]", (copy = [[md5 copy] autorelease])) TEST(@"-[digest]", - memcmp([md5 digest], testfile_md5, 16) == 0 && - memcmp([copy digest], testfile_md5, 16) == 0) + memcmp(md5.digest, testfile_md5, 16) == 0 && + memcmp(copy.digest, testfile_md5, 16) == 0) EXPECT_EXCEPTION(@"Detect invalid call of " @"-[updateWithBuffer:length]", OFHashAlreadyCalculatedException, [md5 updateWithBuffer: "" length: 1]) [pool drain]; } @end