Skip to content

Commit

Permalink
feat(#3251): more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Sep 23, 2024
1 parent e4bf1be commit 29050f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 8 additions & 6 deletions eo-runtime/src/test/eo/org/eolang/sys/win32-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
[] > converts-win32-inet-addr
or. > @
os.is-windows.not
eq.
code.
win32
"inet_addr"
* "127.0.0.1"
2130706433
QQ.io.stdout
QQ.txt.sprintf
"Windows inet_addr '%d'"
*
code.
win32
"inet_addr"
* "127.0.0.1"

# Test.
[] > win32-sockaddr-in-returns-valid-size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void tearDown() throws IOException {

@Test
void connectsSuccessfullyViaSyscalls() {
EOwin32Test.startupsWSA();
assert EOwin32Test.startupsWSA() == 0;
final int descriptor = EOwin32Test.createsSocket();
assert descriptor >= 0;
final int connected = Winsock.INSTANCE.connect(
Expand All @@ -218,6 +218,12 @@ void connectsSuccessfullyViaSyscalls() {
),
16
);
if (connected != 0) {
Logger.info(
this,
"WIN SOCK ERROR " + Winsock.INSTANCE.WSAGetLastError()
);
}
MatcherAssert.assertThat(
"Winsock 'connect' func call should have successfully connected to local server, but it didn't",
connected,
Expand Down

0 comments on commit 29050f8

Please sign in to comment.