Differences From Artifact [f4ae6e53d2]:
- File
tests/OFMD5HashTests.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: 1642) [annotate] [blame] [check-ins using] [more...]
To Artifact [84a8c85775]:
- File
tests/OFMD5HashTests.m
— part of check-in
[e629dc83a9]
at
2019-12-27 00:41:54
on branch trunk
— OFSecureData: Add allowsSwappableMemory property
With this property, it's possible to specify whether the memory should
be protected from swapping or not. This makes it easier for e.g. the
crypto hash classes: They can now just always use OFSecureData without
wasting unswappable memory if it's not needed. (user: js, size: 1704) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
30 31 32 33 34 35 36 |
- (void)MD5HashTests
{
void *pool = objc_autoreleasePoolPush();
OFMD5Hash *md5, *copy;
OFFile *f = [OFFile fileWithPath: @"testfile.bin"
mode: @"r"];
| > | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
- (void)MD5HashTests
{
void *pool = objc_autoreleasePoolPush();
OFMD5Hash *md5, *copy;
OFFile *f = [OFFile fileWithPath: @"testfile.bin"
mode: @"r"];
TEST(@"+[cryptoHashWithAllowsSwappableMemory:]",
(md5 = [OFMD5Hash cryptoHashWithAllowsSwappableMemory: true]))
while (!f.atEndOfStream) {
char buf[64];
size_t len = [f readIntoBuffer: buf
length: 64];
[md5 updateWithBuffer: buf
length: len];
|
| ︙ | ︙ |