ObjFW  Diff

Differences From Artifact [fe454fc94f]:

To Artifact [ad2f2ab750]:


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
	void *pool = objc_autoreleasePoolPush();
	size_t pageSize = [OFSystemInfo pageSize];
	StreamTester *t = [[[StreamTester alloc] init] autorelease];
	OFString *str;
	char *cstr;

	cstr = of_alloc(pageSize - 2, 1);
	memset(cstr, 'X', pageSize - 3);
	cstr[pageSize - 3] = '\0';

	TEST(@"-[readLine]", [[t readLine] isEqual: @"foo"] &&
	    [(str = [t readLine]) length] == pageSize - 3 &&
	    !strcmp(str.UTF8String, cstr))

	free(cstr);

	objc_autoreleasePoolPop(pool);
}
@end







|







|




64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
	void *pool = objc_autoreleasePoolPush();
	size_t pageSize = [OFSystemInfo pageSize];
	StreamTester *t = [[[StreamTester alloc] init] autorelease];
	OFString *str;
	char *cstr;

	cstr = OFAllocMemory(pageSize - 2, 1);
	memset(cstr, 'X', pageSize - 3);
	cstr[pageSize - 3] = '\0';

	TEST(@"-[readLine]", [[t readLine] isEqual: @"foo"] &&
	    [(str = [t readLine]) length] == pageSize - 3 &&
	    !strcmp(str.UTF8String, cstr))

	OFFreeMemory(cstr);

	objc_autoreleasePoolPop(pool);
}
@end