28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
OFDDPSocket *sock;
OFSocketAddress address1, address2;
char buffer[5];
TEST(@"+[socket]", (sock = [OFDDPSocket socket]))
@try {
TEST(@"-[bindToNetwork:node:port:]",
R(address1 = [sock bindToNetwork: 0 node: 0 port: 0]))
} @catch (OFBindSocketFailedException *e) {
switch (e.errNo) {
case EAFNOSUPPORT:
[OFStdOut setForegroundColor: [OFColor lime]];
[OFStdOut writeLine:
@"\r[OFDDPSocket] -[bindToNetwork:node:port:] "
@"AppleTalk unsupported, skipping tests"];
break;
case EADDRNOTAVAIL:
[OFStdOut setForegroundColor: [OFColor lime]];
[OFStdOut writeLine:
@"\r[OFDDPSocket] -[bindToNetwork:node:port:] "
@"AppleTalk not configured, skipping tests"];
break;
default:
@throw e;
}
objc_autoreleasePoolPop(pool);
|
|
|
|
|
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
OFDDPSocket *sock;
OFSocketAddress address1, address2;
char buffer[5];
TEST(@"+[socket]", (sock = [OFDDPSocket socket]))
@try {
TEST(@"-[bindToNetwork:port:]",
R(address1 = [sock bindToNetwork: 0 port: 0]))
} @catch (OFBindSocketFailedException *e) {
switch (e.errNo) {
case EAFNOSUPPORT:
[OFStdOut setForegroundColor: [OFColor lime]];
[OFStdOut writeLine:
@"\r[OFDDPSocket] -[bindToNetwork:port:] "
@"AppleTalk unsupported, skipping tests"];
break;
case EADDRNOTAVAIL:
[OFStdOut setForegroundColor: [OFColor lime]];
[OFStdOut writeLine:
@"\r[OFDDPSocket] -[bindToNetwork:port:] "
@"AppleTalk not configured, skipping tests"];
break;
default:
@throw e;
}
objc_autoreleasePoolPop(pool);
|