Skip to content

Commit

Permalink
feat(#3251): test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Sep 25, 2024
1 parent 3b83c77 commit 8fe1e7c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void refusesConnectionViaPosixSyscall() {
final SockaddrIn addr = new SockaddrIn(
(short) CStdLib.AF_INET,
EOsocketTest.htons(1234),
CStdLib.INSTANCE.inet_addr(EOsocketTest.LOCALHOST)
Integer.reverseBytes(CStdLib.INSTANCE.inet_addr(EOsocketTest.LOCALHOST))
);
final int connected = CStdLib.INSTANCE.connect(socket, addr, addr.size());
MatcherAssert.assertThat(
Expand All @@ -168,7 +168,7 @@ void refusesConnectionViaWindowsSyscall() {
assert Winsock.INSTANCE.WSAStartup(
Winsock.WINSOCK_VERSION_2_2,
new WSAStartupFuncCall.WSAData()
) > 0;
) == 0;
final int socket = Winsock.INSTANCE.socket(
Winsock.AF_INET,
Winsock.SOCK_STREAM,
Expand All @@ -178,7 +178,7 @@ void refusesConnectionViaWindowsSyscall() {
final SockaddrIn addr = new SockaddrIn(
(short) Winsock.AF_INET,
EOsocketTest.htons(1234),
Winsock.INSTANCE.inet_addr(EOsocketTest.LOCALHOST)
Integer.reverseBytes(Winsock.INSTANCE.inet_addr(EOsocketTest.LOCALHOST))
);
final int connected = Winsock.INSTANCE.connect(socket, addr, addr.size());
MatcherAssert.assertThat(
Expand Down

0 comments on commit 8fe1e7c

Please sign in to comment.