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