Files
Library/tests/standalone/Net/Socket.cpp
T
faumaray 7ca0e1b62e
CI / GCC 16 / C++26 / sanitizers (pull_request) Has been cancelled
CI / GCC 16 / C++26 / werror (pull_request) Has been cancelled
CI / GCC 16 / C++26 / default (pull_request) Has been cancelled
Process update and UdpSocket
Signed-off-by: faumaray <faumaray@gmail.com>
2026-07-11 21:40:52 +03:00

22 lines
579 B
C++

#include <Void/Net/Socket.hpp>
#include <Void/Testing/Assert.hpp>
#include <Void/Testing/Test.hpp>
#include <chrono>
#include <utility>
Void::Testing::Test udp_socket_default_is_closed()
{
Void::Net::UdpSocket socket;
Void::Testing::expect(!socket.valid());
Void::Testing::expect(!socket.wait_readable(std::chrono::milliseconds{0}));
}
Void::Testing::Test udp_socket_move_preserves_closed_state()
{
Void::Net::UdpSocket source;
Void::Net::UdpSocket destination = std::move(source);
Void::Testing::expect(!source.valid());
Void::Testing::expect(!destination.valid());
}