Process update and UdpSocket
Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
1 parent
827c9e150a
commit
7ca0e1b62e
5 files changed
+241
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#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());
|
||||
}
|
||||
Reference in new issue
Block a user