Differences From Artifact [9aaabddcf7]:
- File tests/OFRIPEMD160HashTests.m — part of check-in [b045cbb9c7] at 2019-03-25 00:21:30 on branch trunk — tests: Use dot syntax (user: js, size: 1720) [annotate] [blame] [check-ins using]
To Artifact [0fcea6bf49]:
- File
tests/OFRIPEMD160HashTests.m
— part of check-in
[09be825f88]
at
2019-09-29 15:58:33
on branch trunk
— Remove OFAutoreleasePool
OFAutoreleasePools have long been discouraged in favor of the runtime's
autorelease pools. (user: js, size: 1718) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
26 27 28 29 30 31 32 | const uint8_t testfile_rmd160[20] = "\x46\x02\x97\xF5\x85\xDF\xB9\x21\x00\xC8\xF9\x87\xC6\xEC\x84\x0D\xCE" "\xE6\x08\x8B"; @implementation TestsAppDelegate (OFRIPEMD160HashTests) - (void)RIPEMD160HashTests { | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | const uint8_t testfile_rmd160[20] = "\x46\x02\x97\xF5\x85\xDF\xB9\x21\x00\xC8\xF9\x87\xC6\xEC\x84\x0D\xCE" "\xE6\x08\x8B"; @implementation TestsAppDelegate (OFRIPEMD160HashTests) - (void)RIPEMD160HashTests { void *pool = objc_autoreleasePoolPush(); OFRIPEMD160Hash *rmd160, *copy; OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"r"]; TEST(@"+[cryptoHash]", (rmd160 = [OFRIPEMD160Hash cryptoHash])) while (!f.atEndOfStream) { |
︙ | ︙ | |||
53 54 55 56 57 58 59 | memcmp(copy.digest, testfile_rmd160, 20) == 0) EXPECT_EXCEPTION(@"Detect invalid call of " @"-[updateWithBuffer:length]", OFHashAlreadyCalculatedException, [rmd160 updateWithBuffer: "" length: 1]) | | | 53 54 55 56 57 58 59 60 61 62 | memcmp(copy.digest, testfile_rmd160, 20) == 0) EXPECT_EXCEPTION(@"Detect invalid call of " @"-[updateWithBuffer:length]", OFHashAlreadyCalculatedException, [rmd160 updateWithBuffer: "" length: 1]) objc_autoreleasePoolPop(pool); } @end |