test: #ifdef out unused code on Windows to fix warnings

This commit is contained in:
Benjamin Gilbert 2024-10-17 19:05:11 -07:00
parent 859e7bea39
commit 44f49dd752
3 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
static int connect_cb_called;
static int write_cb_called;
static int close_cb_called;
@ -47,6 +48,7 @@ static void write_cb(uv_write_t* req, int status) {
ASSERT_LT(status, 0);
write_cb_called++;
}
#endif
/*

View File

@ -22,6 +22,7 @@
#include "uv.h"
#include "task.h"
#if !defined(__OpenBSD__) && !defined(_WIN32)
static uv_tcp_t tcp;
static uv_connect_t connect_req;
static uv_buf_t qbuf;
@ -69,6 +70,7 @@ static void connect_cb(uv_connect_t *req, int status) {
called_connect_cb++;
}
#endif
/*

View File

@ -26,6 +26,7 @@
#include "task.h"
#include "uv.h"
#if !defined(_WIN32) && !defined(__PASE__)
static uv_tcp_t server;
static uv_tcp_t client;
static uv_tcp_t incoming;
@ -110,6 +111,7 @@ static void start_server(void) {
ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) &addr, 0));
ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, connection_cb));
}
#endif
TEST_IMPL(tcp_write_in_a_row) {
#if defined(_WIN32)