31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
@implementation TestsAppDelegate (OFHashesTests)
- (void)hashesTests
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFMD5Hash *md5;
OFSHA1Hash *sha1;
OFFile *f = [OFFile fileWithPath: @"testfile"
mode: @"rb"];
TEST(@"+[md5Hash]", (md5 = [OFMD5Hash md5Hash]))
TEST(@"+[sha1Hash]", (sha1 = [OFSHA1Hash sha1Hash]))
while (![f atEndOfStream]) {
|
|
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
@implementation TestsAppDelegate (OFHashesTests)
- (void)hashesTests
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFMD5Hash *md5;
OFSHA1Hash *sha1;
OFFile *f = [OFFile fileWithPath: @"testfile.bin"
mode: @"rb"];
TEST(@"+[md5Hash]", (md5 = [OFMD5Hash md5Hash]))
TEST(@"+[sha1Hash]", (sha1 = [OFSHA1Hash sha1Hash]))
while (![f atEndOfStream]) {
|