1 USING: kernel tools.test windows.winsock ;
2 IN: windows.winsock.tests
4 : normal-socket ( -- socket )
5 AF_INET SOCK_STREAM IPPROTO_TCP socket ;
8 98 97 96 socket normal-socket [ INVALID_SOCKET = ] bi@
11 { 0 } [ normal-socket closesocket ] unit-test
13 ! Generate lots of socket errors
15 normal-socket 99 98 "bad bad!" 3 setsockopt
17 normal-socket "hello" 5 0 send
18 [ SOCKET_ERROR = ] tri@