77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
TEST(@"-[writeBuffer:length:]",
R([sockAccepted writeBuffer: "Hello" length: 5]))
TEST(@"-[readIntoBuffer:length:]",
[sockClient readIntoBuffer: buffer length: 5] == 5 &&
memcmp(buffer, "Hello", 5) == 0)
TEST(@"-[remoteAddress]",
OFSocketAddressUNIXPath(sockAccepted.remoteAddress) == nil)
} @finally {
#ifdef OF_HAVE_FILES
[[OFFileManager defaultManager] removeItemAtPath: path];
#endif
}
objc_autoreleasePoolPop(pool);
}
@end
|
|
|
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
TEST(@"-[writeBuffer:length:]",
R([sockAccepted writeBuffer: "Hello" length: 5]))
TEST(@"-[readIntoBuffer:length:]",
[sockClient readIntoBuffer: buffer length: 5] == 5 &&
memcmp(buffer, "Hello", 5) == 0)
TEST(@"-[remoteAddress]", OFSocketAddressUNIXPath(
sockAccepted.remoteAddress).length == 0)
} @finally {
#ifdef OF_HAVE_FILES
[[OFFileManager defaultManager] removeItemAtPath: path];
#endif
}
objc_autoreleasePoolPop(pool);
}
@end
|