72
73
74
75
76
77
78
79
80
81
82
83
84
|
char *cstr;
cstr = [t allocMemoryWithSize: pageSize - 2];
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))
objc_autoreleasePoolPop(pool);
}
@end
|
|
|
72
73
74
75
76
77
78
79
80
81
82
83
84
|
char *cstr;
cstr = [t allocMemoryWithSize: pageSize - 2];
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))
objc_autoreleasePoolPop(pool);
}
@end
|