88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
-
+
-
+
-
+
|
@try {
TEST(@"-[bindToPort:]",
R(address1 = [sockServer bindToPort: 0]))
} @catch (OFBindFailedException *e) {
switch (e.errNo) {
case EAFNOSUPPORT:
of_stdout.foregroundColor = [OFColor lime];
[of_stdout setForegroundColor: [OFColor lime]];
[of_stdout writeLine:
@"[OFSPXStreamSocket] -[bindToPort:]: "
@"IPX unsupported, skipping tests"];
break;
case ESOCKTNOSUPPORT:
of_stdout.foregroundColor = [OFColor lime];
[of_stdout setForegroundColor: [OFColor lime]];
[of_stdout writeLine:
@"[OFSPXStreamSocket] -[bindToPort:]: "
@"SPX unsupported, skipping tests"];
break;
case EADDRNOTAVAIL:
of_stdout.foregroundColor = [OFColor lime];
[of_stdout setForegroundColor: [OFColor lime]];
[of_stdout writeLine:
@"[OFSPXStreamSocket] -[bindToPort:]: "
@"IPX not configured, skipping tests"];
break;
default:
@throw e;
}
|
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
-
+
|
[OFDate dateWithTimeIntervalSinceNow: 2]];
TEST(@"-[asyncAccept] & -[asyncConnectToNode:network:port:]",
delegate->_accepted && delegate->_connected)
} @catch (OFObserveFailedException *e) {
switch (e.errNo) {
case ENOTSOCK:
of_stdout.foregroundColor = [OFColor lime];
[of_stdout setForegroundColor: [OFColor lime]];
[of_stdout writeLine:
@"[OFSPXStreamSocket] -[asyncAccept] & "
@"-[asyncConnectToNode:network:port:]: select() "
@"not supported for SPX, skipping test"];
break;
default:
@throw e;
}
}
objc_autoreleasePoolPop(pool);
}
@end
|