@@ -30,36 +30,34 @@ final class SocketTest: XCTestCase {
3030 let writeBufAddr = writeBuf. baseAddress
3131
3232 let syscallTestCases : Array < MockTestCase > = [
33- MockTestCase ( name: " socket " , PF_INET6, SOCK_STREAM, 0 , interruptable : true ) {
33+ MockTestCase ( name: " socket " , . interruptable , PF_INET6, SOCK_STREAM, 0 ) {
3434 retryOnInterrupt in
3535 _ = try SocketDescriptor . open ( . ipv6, . stream, retryOnInterrupt: retryOnInterrupt)
3636 } ,
37- MockTestCase ( name: " shutdown " , rawSocket , SHUT_RD , interruptable : false ) {
37+ MockTestCase ( name: " shutdown " , . noInterrupt , rawSocket , SHUT_RD ) {
3838 retryOnInterrupt in
3939 _ = try socket. shutdown ( . read)
4040 } ,
41- MockTestCase ( name: " listen " , rawSocket , 999 , interruptable : false ) {
41+ MockTestCase ( name: " listen " , . noInterrupt , rawSocket , 999 ) {
4242 retryOnInterrupt in
4343 _ = try socket. listen ( backlog: 999 )
4444 } ,
4545 MockTestCase (
46- name: " recv " , rawSocket, bufAddr, bufCount, MSG_PEEK, interruptable : true
46+ name: " recv " , . interruptable , rawSocket, bufAddr, bufCount, MSG_PEEK
4747 ) {
4848 retryOnInterrupt in
4949 _ = try socket. receive (
5050 into: rawBuf, flags: . peek, retryOnInterrupt: retryOnInterrupt)
5151 } ,
5252 MockTestCase (
53- name: " send " , rawSocket, writeBufAddr, bufCount, MSG_DONTROUTE,
54- interruptable: true
53+ name: " send " , . interruptable, rawSocket, writeBufAddr, bufCount, MSG_DONTROUTE
5554 ) {
5655 retryOnInterrupt in
5756 _ = try socket. send (
5857 writeBuf, flags: . doNotRoute, retryOnInterrupt: retryOnInterrupt)
5958 } ,
6059 MockTestCase (
61- name: " recvfrom " , rawSocket, Wildcard ( ) , Wildcard ( ) , 42 , Wildcard ( ) , Wildcard ( ) ,
62- interruptable: true
60+ name: " recvfrom " , . interruptable, rawSocket, Wildcard ( ) , Wildcard ( ) , 42 , Wildcard ( ) , Wildcard ( )
6361 ) { retryOnInterrupt in
6462 var sender = SocketAddress ( )
6563 _ = try socket. receive ( into: rawBuf,
@@ -68,8 +66,7 @@ final class SocketTest: XCTestCase {
6866 retryOnInterrupt: retryOnInterrupt)
6967 } ,
7068 MockTestCase (
71- name: " sendto " , rawSocket, Wildcard ( ) , Wildcard ( ) , 42 , Wildcard ( ) , Wildcard ( ) ,
72- interruptable: true
69+ name: " sendto " , . interruptable, rawSocket, Wildcard ( ) , Wildcard ( ) , 42 , Wildcard ( ) , Wildcard ( )
7370 ) { retryOnInterrupt in
7471 let recipient = SocketAddress ( ipv4: . loopback, port: 123 )
7572 _ = try socket. send ( UnsafeRawBufferPointer ( rawBuf) ,
@@ -78,8 +75,7 @@ final class SocketTest: XCTestCase {
7875 retryOnInterrupt: retryOnInterrupt)
7976 } ,
8077 MockTestCase (
81- name: " recvmsg " , rawSocket, Wildcard ( ) , 42 ,
82- interruptable: true
78+ name: " recvmsg " , . interruptable, rawSocket, Wildcard ( ) , 42
8379 ) { retryOnInterrupt in
8480 var sender = SocketAddress ( )
8581 var ancillary = SocketDescriptor . AncillaryMessageBuffer ( )
@@ -90,8 +86,7 @@ final class SocketTest: XCTestCase {
9086 retryOnInterrupt: retryOnInterrupt)
9187 } ,
9288 MockTestCase (
93- name: " sendmsg " , rawSocket, Wildcard ( ) , 42 ,
94- interruptable: true
89+ name: " sendmsg " , . interruptable, rawSocket, Wildcard ( ) , 42
9590 ) { retryOnInterrupt in
9691 let recipient = SocketAddress ( ipv4: . loopback, port: 123 )
9792 let ancillary = SocketDescriptor . AncillaryMessageBuffer ( )
0 commit comments