Differences From Artifact [66b4d11501]:
- File
tests/OFMD5HashTests.m
— part of check-in
[1483709ab2]
at
2022-08-01 21:20:54
on branch trunk
— Add support for embedding files into binaries
Embedded files are available via the objfw-embedded: URL scheme. (user: js, size: 1784) [annotate] [blame] [check-ins using] [more...]
To Artifact [97c4cf5d1a]:
- File tests/OFMD5HashTests.m — part of check-in [338d452f33] at 2022-08-11 20:54:05 on branch trunk — OFURLHandler: Add +[openItemAtURL:mode:] (user: js, size: 1758) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
26 27 28 29 30 31 32 |
@implementation TestsAppDelegate (OFMD5HashTests)
- (void)MD5HashTests
{
void *pool = objc_autoreleasePoolPush();
OFMD5Hash *MD5, *MD5Copy;
OFURL *URL = [OFURL URLWithString: @"objfw-embedded:///testfile.bin"];
| < | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
@implementation TestsAppDelegate (OFMD5HashTests)
- (void)MD5HashTests
{
void *pool = objc_autoreleasePoolPush();
OFMD5Hash *MD5, *MD5Copy;
OFURL *URL = [OFURL URLWithString: @"objfw-embedded:///testfile.bin"];
OFStream *file = [OFURLHandler openItemAtURL: URL mode: @"r"];
TEST(@"+[hashWithAllowsSwappableMemory:]",
(MD5 = [OFMD5Hash hashWithAllowsSwappableMemory: true]))
while (!file.atEndOfStream) {
char buffer[64];
size_t length = [file readIntoBuffer: buffer length: 64];
|
| ︙ | ︙ |