From a9bad602df6e91e6c6f79dc70899f1f6dd0294a9 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 6 Nov 2018 14:34:49 +0100 Subject: [PATCH] renaming --- README.md | 38 +++++++++++++------------- src/uvw/handle.hpp | 20 +++++++------- src/uvw/loop.hpp | 2 +- src/uvw/stream.hpp | 6 ++-- src/uvw/tcp.hpp | 18 ++++++------ src/uvw/udp.hpp | 4 +-- test/main.cpp | 28 +++++++++---------- test/uvw/tcp.cpp | 68 +++++++++++++++++++++++----------------------- test/uvw/udp.cpp | 10 +++---- test/uvw/util.cpp | 2 +- 10 files changed, 98 insertions(+), 98 deletions(-) diff --git a/README.md b/README.md index 285760db..c950e21d 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,13 @@ As an example, a *handle* should be initialized before any other operation and c #include void listen(uvw::Loop &loop) { - std::shared_ptr tcp = loop.resource(); + std::shared_ptr tcp = loop.resource(); - tcp->once([](const uvw::ListenEvent &, uvw::TcpHandle &srv) { - std::shared_ptr client = srv.loop().resource(); + tcp->once([](const uvw::ListenEvent &, uvw::TCPHandle &srv) { + std::shared_ptr client = srv.loop().resource(); - client->on([ptr = srv.shared_from_this()](const uvw::CloseEvent &, uvw::TcpHandle &) { ptr->close(); }); - client->on([](const uvw::EndEvent &, uvw::TcpHandle &client) { client.close(); }); + client->on([ptr = srv.shared_from_this()](const uvw::CloseEvent &, uvw::TCPHandle &) { ptr->close(); }); + client->on([](const uvw::EndEvent &, uvw::TCPHandle &client) { client.close(); }); srv.accept(*client); client->read(); @@ -47,11 +47,11 @@ void listen(uvw::Loop &loop) { } void conn(uvw::Loop &loop) { - auto tcp = loop.resource(); + auto tcp = loop.resource(); - tcp->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { /* handle errors */ }); + tcp->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { /* handle errors */ }); - tcp->once([](const uvw::ConnectEvent &, uvw::TcpHandle &tcp) { + tcp->once([](const uvw::ConnectEvent &, uvw::TCPHandle &tcp) { auto dataWrite = std::unique_ptr(new char[2]{ 'b', 'c' }); tcp.write(std::move(dataWrite), 2); tcp.close(); @@ -202,7 +202,7 @@ Available modes are: `DEFAULT`, `ONCE`, `NOWAIT`. Please refer to the documentat In order to create a resource and to bind it to the given loop, just do the following: ```cpp -auto tcp = loop.resource(); +auto tcp = loop.resource(); ``` The line above will create and initialize a tcp handle, then a shared pointer to that resource will be returned.
@@ -210,7 +210,7 @@ Users should check if pointers have been correctly initialized: in case of error Another way to create a resource is: ```cpp -auto tcp = TcpHandle::create(loop); +auto tcp = TCPHandle::create(loop); tcp->init(); ``` @@ -272,7 +272,7 @@ There exist two methods to attach an event to a resource: * `resource.once(listener)`: the listener will be automatically removed after the first event of the given type. * `resource.on(listener)`: to be used for long-running listeners. -Both of them return an object of type `ResourceType::Connection` (as an example, `TcpHandle::Connection`).
+Both of them return an object of type `ResourceType::Connection` (as an example, `TCPHandle::Connection`).
A connection object can be used later as an argument to the `erase` member function of the resource to remove the listener.
There exists also the `clear` member function to drop all the listeners at once. @@ -283,14 +283,14 @@ The code below shows how to create a simple tcp server using `uvw`: ```cpp auto loop = uvw::Loop::getDefault(); -auto tcp = loop.resource(); +auto tcp = loop.resource(); -tcp->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { /* something went wrong */ }); +tcp->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { /* something went wrong */ }); -tcp->on([](const uvw::ListenEvent &, uvw::TcpHandle &srv) { - std::shared_ptr client = srv.loop().resource(); - client->once([](const uvw::EndEvent &, uvw::TcpHandle &client) { client.close(); }); - client->on([](const uvw::DataEvent &, uvw::TcpHandle &) { /* data received */ }); +tcp->on([](const uvw::ListenEvent &, uvw::TCPHandle &srv) { + std::shared_ptr client = srv.loop().resource(); + client->once([](const uvw::EndEvent &, uvw::TCPHandle &client) { client.close(); }); + client->on([](const uvw::DataEvent &, uvw::TCPHandle &) { /* data received */ }); srv.accept(*client); client->read(); }); @@ -299,7 +299,7 @@ tcp->bind("127.0.0.1", 4242); tcp->listen(); ``` -Note also that `uvw::TcpHandle` already supports _IPv6_ out-of-the-box. The statement above is equivalent to `tcp->bind("127.0.0.1", 4242)`.
+Note also that `uvw::TCPHandle` already supports _IPv6_ out-of-the-box. The statement above is equivalent to `tcp->bind("127.0.0.1", 4242)`.
It's suffice to explicitly specify `uvw::IPv6` as the underlying protocol to use it. The API reference is the recommended documentation for further details about resources and their methods. @@ -319,7 +319,7 @@ That being said, _going raw_ is a matter of using the `raw` member functions: ```cpp auto loop = uvw::Loop::getDefault(); -auto tcp = loop.resource(); +auto tcp = loop.resource(); uv_loop_t *raw = loop->raw(); uv_tcp_t *handle = tcp->raw(); diff --git a/src/uvw/handle.hpp b/src/uvw/handle.hpp index 6f2605dd..f5322be0 100644 --- a/src/uvw/handle.hpp +++ b/src/uvw/handle.hpp @@ -99,7 +99,7 @@ public: * * * An AsyncHandle handle is always active and cannot be deactivated, * except by closing it with uv_close(). - * * A PipeHandle, TcpHandle, UDPHandle, etc. handle - basically any handle + * * A PipeHandle, TCPHandle, UDPHandle, etc. handle - basically any handle * that deals with I/O - is active when it is doing something that involves * I/O, like reading, writing, connecting, accepting new connections, etc. * * A CheckHandle, IdleHandle, TimerHandle, etc. handle is active when it @@ -183,8 +183,8 @@ public: * * Gets the size of the send buffer that the operating system uses for the * socket.
- * This function works for TcpHandle, PipeHandle and UDPHandle handles on - * Unix and for TcpHandle and UDPHandle handles on Windows.
+ * This function works for TCPHandle, PipeHandle and UDPHandle handles on + * Unix and for TCPHandle and UDPHandle handles on Windows.
* Note that Linux will return double the size of the original set value. * * @return The size of the send buffer, 0 in case of errors. @@ -200,8 +200,8 @@ public: * * Sets the size of the send buffer that the operating system uses for the * socket.
- * This function works for TcpHandle, PipeHandle and UDPHandle handles on - * Unix and for TcpHandle and UDPHandle handles on Windows.
+ * This function works for TCPHandle, PipeHandle and UDPHandle handles on + * Unix and for TCPHandle and UDPHandle handles on Windows.
* Note that Linux will set double the size. * * @return True in case of success, false otherwise. @@ -215,8 +215,8 @@ public: * * Gets the size of the receive buffer that the operating system uses for * the socket.
- * This function works for TcpHandle, PipeHandle and UDPHandle handles on - * Unix and for TcpHandle and UDPHandle handles on Windows.
+ * This function works for TCPHandle, PipeHandle and UDPHandle handles on + * Unix and for TCPHandle and UDPHandle handles on Windows.
* Note that Linux will return double the size of the original set value. * * @return The size of the receive buffer, 0 in case of errors. @@ -232,8 +232,8 @@ public: * * Sets the size of the receive buffer that the operating system uses for * the socket.
- * This function works for TcpHandle, PipeHandle and UDPHandle handles on - * Unix and for TcpHandle and UDPHandle handles on Windows.
+ * This function works for TCPHandle, PipeHandle and UDPHandle handles on + * Unix and for TCPHandle and UDPHandle handles on Windows.
* Note that Linux will set double the size. * * @return True in case of success, false otherwise. @@ -247,7 +247,7 @@ public: * * Supported handles: * - * * TcpHandle + * * TCPHandle * * PipeHandle * * TTYHandle * * UDPHandle diff --git a/src/uvw/loop.hpp b/src/uvw/loop.hpp index fd3d6cea..571212e2 100644 --- a/src/uvw/loop.hpp +++ b/src/uvw/loop.hpp @@ -74,7 +74,7 @@ struct BaseHandle { * * * An AsyncHandle handle is always active and cannot be deactivated, * except by closing it with uv_close(). - * * A PipeHandle, TcpHandle, UDPHandle, etc. handle - basically any handle + * * A PipeHandle, TCPHandle, UDPHandle, etc. handle - basically any handle * that deals with I/O - is active when it is doing something that involves * I/O, like reading, writing, connecting, accepting new connections, etc. * * A CheckHandle, IdleHandle, TimerHandle, etc. handle is active when it diff --git a/src/uvw/stream.hpp b/src/uvw/stream.hpp index 5850c431..46f583c5 100644 --- a/src/uvw/stream.hpp +++ b/src/uvw/stream.hpp @@ -124,7 +124,7 @@ private: * * Stream handles provide an abstraction of a duplex communication channel. * StreamHandle is an intermediate type, `uvw` provides three stream - * implementations: TcpHandle, PipeHandle and TTYHandle. + * implementations: TCPHandle, PipeHandle and TTYHandle. */ template class StreamHandle: public Handle { @@ -301,7 +301,7 @@ public: * * The pipe must be initialized with `ipc == true`. * - * `send` must be a TcpHandle or PipeHandle handle, which is a server or a + * `send` must be a TCPHandle or PipeHandle handle, which is a server or a * connection (listening or connected state). Bound sockets or pipes will be * assumed to be servers. * @@ -336,7 +336,7 @@ public: * * The pipe must be initialized with `ipc == true`. * - * `send` must be a TcpHandle or PipeHandle handle, which is a server or a + * `send` must be a TCPHandle or PipeHandle handle, which is a server or a * connection (listening or connected state). Bound sockets or pipes will be * assumed to be servers. * diff --git a/src/uvw/tcp.hpp b/src/uvw/tcp.hpp index 49cdc75a..af5a81d8 100644 --- a/src/uvw/tcp.hpp +++ b/src/uvw/tcp.hpp @@ -18,7 +18,7 @@ namespace uvw { namespace details { -enum class UVTcpFlags: std::underlying_type_t { +enum class UVTCPFlags: std::underlying_type_t { IPV6ONLY = UV_TCP_IPV6ONLY }; @@ -27,13 +27,13 @@ enum class UVTcpFlags: std::underlying_type_t { /** - * @brief The TcpHandle handle. + * @brief The TCPHandle handle. * * TCP handles are used to represent both TCP streams and servers.
* By default, _IPv4_ is used as a template parameter. The handle already * supports _IPv6_ out-of-the-box by using `uvw::IPv6`. * - * To create a `TcpHandle` through a `Loop`, arguments follow: + * To create a `TCPHandle` through a `Loop`, arguments follow: * * * An optional integer value that indicates the flags used to initialize * the socket. @@ -42,14 +42,14 @@ enum class UVTcpFlags: std::underlying_type_t { * [documentation](http://docs.libuv.org/en/v1.x/tcp.html#c.uv_tcp_init_ex) * for further details. */ -class TcpHandle final: public StreamHandle { +class TCPHandle final: public StreamHandle { public: using Time = std::chrono::duration; - using Bind = details::UVTcpFlags; + using Bind = details::UVTCPFlags; using IPv4 = uvw::IPv4; using IPv6 = uvw::IPv6; - explicit TcpHandle(ConstructorAccess ca, std::shared_ptr ref, unsigned int f = {}) + explicit TCPHandle(ConstructorAccess ca, std::shared_ptr ref, unsigned int f = {}) : StreamHandle{ca, std::move(ref)}, tag{f ? FLAGS : DEFAULT}, flags{f} {} @@ -123,7 +123,7 @@ public: * * Available flags are: * - * * `TcpHandle::Bind::IPV6ONLY`: it disables dual-stack support and only + * * `TCPHandle::Bind::IPV6ONLY`: it disables dual-stack support and only * IPv6 is used. * * @param addr Initialized `sockaddr_in` or `sockaddr_in6` data structure. @@ -143,7 +143,7 @@ public: * * Available flags are: * - * * `TcpHandle::Bind::IPV6ONLY`: it disables dual-stack support and only + * * `TCPHandle::Bind::IPV6ONLY`: it disables dual-stack support and only * IPv6 is used. * * @param ip The address to which to bind. @@ -167,7 +167,7 @@ public: * * Available flags are: * - * * `TcpHandle::Bind::IPV6ONLY`: it disables dual-stack support and only + * * `TCPHandle::Bind::IPV6ONLY`: it disables dual-stack support and only * IPv6 is used. * * @param addr A valid instance of Addr. diff --git a/src/uvw/udp.hpp b/src/uvw/udp.hpp index 9baafa95..b5dfbec2 100644 --- a/src/uvw/udp.hpp +++ b/src/uvw/udp.hpp @@ -45,7 +45,7 @@ struct UDPDataEvent { namespace details { -enum class UVUdpFlags: std::underlying_type_t { +enum class UVUDPFlags: std::underlying_type_t { IPV6ONLY = UV_UDP_IPV6ONLY, REUSEADDR = UV_UDP_REUSEADDR }; @@ -121,7 +121,7 @@ class UDPHandle final: public Handle { public: using Membership = details::UVMembership; - using Bind = details::UVUdpFlags; + using Bind = details::UVUDPFlags; using IPv4 = uvw::IPv4; using IPv6 = uvw::IPv6; diff --git a/test/main.cpp b/test/main.cpp index 0e90b989..b08156b7 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -6,22 +6,22 @@ void listen(uvw::Loop &loop) { - std::shared_ptr tcp = loop.resource(); + std::shared_ptr tcp = loop.resource(); - tcp->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { + tcp->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { std::cout << "error " << std::endl; }); - tcp->once([](const uvw::ListenEvent &, uvw::TcpHandle &srv) { + tcp->once([](const uvw::ListenEvent &, uvw::TCPHandle &srv) { std::cout << "listen" << std::endl; - std::shared_ptr client = srv.loop().resource(); + std::shared_ptr client = srv.loop().resource(); - client->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { + client->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { std::cout << "error " << std::endl; }); - client->on([ptr = srv.shared_from_this()](const uvw::CloseEvent &, uvw::TcpHandle &) { + client->on([ptr = srv.shared_from_this()](const uvw::CloseEvent &, uvw::TCPHandle &) { std::cout << "close" << std::endl; ptr->close(); }); @@ -34,12 +34,12 @@ void listen(uvw::Loop &loop) { uvw::Addr remote = client->peer(); std::cout << "remote: " << remote.ip << " " << remote.port << std::endl; - client->on([](const uvw::DataEvent &event, uvw::TcpHandle &) { + client->on([](const uvw::DataEvent &event, uvw::TCPHandle &) { std::cout.write(event.data.get(), event.length) << std::endl; std::cout << "data length: " << event.length << std::endl; }); - client->on([](const uvw::EndEvent &, uvw::TcpHandle &handle) { + client->on([](const uvw::EndEvent &, uvw::TCPHandle &handle) { std::cout << "end" << std::endl; int count = 0; handle.loop().walk([&count](uvw::BaseHandle &) { ++count; }); @@ -50,7 +50,7 @@ void listen(uvw::Loop &loop) { client->read(); }); - tcp->once([](const uvw::CloseEvent &, uvw::TcpHandle &) { + tcp->once([](const uvw::CloseEvent &, uvw::TCPHandle &) { std::cout << "close" << std::endl; }); @@ -60,18 +60,18 @@ void listen(uvw::Loop &loop) { void conn(uvw::Loop &loop) { - auto tcp = loop.resource(); + auto tcp = loop.resource(); - tcp->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { + tcp->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { std::cout << "error " << std::endl; }); - tcp->once([](const uvw::WriteEvent &, uvw::TcpHandle &handle) { + tcp->once([](const uvw::WriteEvent &, uvw::TCPHandle &handle) { std::cout << "write" << std::endl; handle.close(); }); - tcp->once([](const uvw::ConnectEvent &, uvw::TcpHandle &handle) { + tcp->once([](const uvw::ConnectEvent &, uvw::TCPHandle &handle) { std::cout << "connect" << std::endl; auto dataTryWrite = std::unique_ptr(new char[1]{ 'a' }); @@ -82,7 +82,7 @@ void conn(uvw::Loop &loop) { handle.write(std::move(dataWrite), 2); }); - tcp->once([](const uvw::CloseEvent &, uvw::TcpHandle &) { + tcp->once([](const uvw::CloseEvent &, uvw::TCPHandle &) { std::cout << "close" << std::endl; }); diff --git a/test/uvw/tcp.cpp b/test/uvw/tcp.cpp index 925ebe71..51894586 100644 --- a/test/uvw/tcp.cpp +++ b/test/uvw/tcp.cpp @@ -2,12 +2,12 @@ #include -TEST(Tcp, Functionalities) { +TEST(TCP, Functionalities) { auto loop = uvw::Loop::getDefault(); - auto handle = loop->resource(); + auto handle = loop->resource(); ASSERT_TRUE(handle->noDelay(true)); - ASSERT_TRUE(handle->keepAlive(true, uvw::TcpHandle::Time{128})); + ASSERT_TRUE(handle->keepAlive(true, uvw::TCPHandle::Time{128})); ASSERT_TRUE(handle->simultaneousAccepts()); handle->close(); @@ -15,33 +15,33 @@ TEST(Tcp, Functionalities) { } -TEST(Tcp, ReadWrite) { +TEST(TCP, ReadWrite) { const std::string address = std::string{"127.0.0.1"}; const unsigned int port = 4242; auto loop = uvw::Loop::getDefault(); - auto server = loop->resource(); - auto client = loop->resource(); + auto server = loop->resource(); + auto client = loop->resource(); server->on([](const auto &, auto &) { FAIL(); }); client->on([](const auto &, auto &) { FAIL(); }); - server->once([](const uvw::ListenEvent &, uvw::TcpHandle &handle) { - std::shared_ptr socket = handle.loop().resource(); + server->once([](const uvw::ListenEvent &, uvw::TCPHandle &handle) { + std::shared_ptr socket = handle.loop().resource(); - socket->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { FAIL(); }); - socket->on([&handle](const uvw::CloseEvent &, uvw::TcpHandle &) { handle.close(); }); - socket->on([](const uvw::EndEvent &, uvw::TcpHandle &sock) { sock.close(); }); + socket->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { FAIL(); }); + socket->on([&handle](const uvw::CloseEvent &, uvw::TCPHandle &) { handle.close(); }); + socket->on([](const uvw::EndEvent &, uvw::TCPHandle &sock) { sock.close(); }); handle.accept(*socket); socket->read(); }); - client->once([](const uvw::WriteEvent &, uvw::TcpHandle &handle) { + client->once([](const uvw::WriteEvent &, uvw::TCPHandle &handle) { handle.close(); }); - client->once([](const uvw::ConnectEvent &, uvw::TcpHandle &handle) { + client->once([](const uvw::ConnectEvent &, uvw::TCPHandle &handle) { ASSERT_TRUE(handle.writable()); ASSERT_TRUE(handle.readable()); @@ -59,23 +59,23 @@ TEST(Tcp, ReadWrite) { } -TEST(Tcp, SockPeer) { +TEST(TCP, SockPeer) { const std::string address = std::string{"127.0.0.1"}; const unsigned int port = 4242; auto loop = uvw::Loop::getDefault(); - auto server = loop->resource(); - auto client = loop->resource(); + auto server = loop->resource(); + auto client = loop->resource(); server->on([](const auto &, auto &) { FAIL(); }); client->on([](const auto &, auto &) { FAIL(); }); - server->once([&address, port](const uvw::ListenEvent &, uvw::TcpHandle &handle) { - std::shared_ptr socket = handle.loop().resource(); + server->once([&address, port](const uvw::ListenEvent &, uvw::TCPHandle &handle) { + std::shared_ptr socket = handle.loop().resource(); - socket->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { FAIL(); }); - socket->on([&handle](const uvw::CloseEvent &, uvw::TcpHandle &) { handle.close(); }); - socket->on([](const uvw::EndEvent &, uvw::TcpHandle &sock) { sock.close(); }); + socket->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { FAIL(); }); + socket->on([&handle](const uvw::CloseEvent &, uvw::TCPHandle &) { handle.close(); }); + socket->on([](const uvw::EndEvent &, uvw::TCPHandle &sock) { sock.close(); }); handle.accept(*socket); socket->read(); @@ -86,7 +86,7 @@ TEST(Tcp, SockPeer) { ASSERT_EQ(addr.port, decltype(addr.port){port}); }); - client->once([&address](const uvw::ConnectEvent &, uvw::TcpHandle &handle) { + client->once([&address](const uvw::ConnectEvent &, uvw::TCPHandle &handle) { uvw::Addr addr = handle.peer(); ASSERT_EQ(addr.ip, address); @@ -103,33 +103,33 @@ TEST(Tcp, SockPeer) { } -TEST(Tcp, Shutdown) { +TEST(TCP, Shutdown) { const std::string address = std::string{"127.0.0.1"}; const unsigned int port = 4242; auto loop = uvw::Loop::getDefault(); - auto server = loop->resource(); - auto client = loop->resource(); + auto server = loop->resource(); + auto client = loop->resource(); server->on([](const auto &, auto &) { FAIL(); }); client->on([](const auto &, auto &) { FAIL(); }); - server->once([](const uvw::ListenEvent &, uvw::TcpHandle &handle) { - std::shared_ptr socket = handle.loop().resource(); + server->once([](const uvw::ListenEvent &, uvw::TCPHandle &handle) { + std::shared_ptr socket = handle.loop().resource(); - socket->on([](const uvw::ErrorEvent &, uvw::TcpHandle &) { FAIL(); }); - socket->on([&handle](const uvw::CloseEvent &, uvw::TcpHandle &) { handle.close(); }); - socket->on([](const uvw::EndEvent &, uvw::TcpHandle &sock) { sock.close(); }); + socket->on([](const uvw::ErrorEvent &, uvw::TCPHandle &) { FAIL(); }); + socket->on([&handle](const uvw::CloseEvent &, uvw::TCPHandle &) { handle.close(); }); + socket->on([](const uvw::EndEvent &, uvw::TCPHandle &sock) { sock.close(); }); handle.accept(*socket); socket->read(); }); - client->once([](const uvw::ShutdownEvent &, uvw::TcpHandle &handle) { + client->once([](const uvw::ShutdownEvent &, uvw::TCPHandle &handle) { handle.close(); }); - client->once([](const uvw::ConnectEvent &, uvw::TcpHandle &handle) { + client->once([](const uvw::ConnectEvent &, uvw::TCPHandle &handle) { handle.shutdown(); }); @@ -141,9 +141,9 @@ TEST(Tcp, Shutdown) { } -TEST(Tcp, WriteError) { +TEST(TCP, WriteError) { auto loop = uvw::Loop::getDefault(); - auto handle = loop->resource(); + auto handle = loop->resource(); bool checkWriteSmartPtrErrorEvent = false; bool checkWriteNakedPtrErrorEvent = false; diff --git a/test/uvw/udp.cpp b/test/uvw/udp.cpp index a6a03c15..bbf71b0a 100644 --- a/test/uvw/udp.cpp +++ b/test/uvw/udp.cpp @@ -2,7 +2,7 @@ #include -TEST(Udp, Functionalities) { +TEST(UDP, Functionalities) { auto loop = uvw::Loop::getDefault(); auto handle = loop->resource(); @@ -21,7 +21,7 @@ TEST(Udp, Functionalities) { } -TEST(Udp, BindRecvStop) { +TEST(UDP, BindRecvStop) { const std::string address = std::string{"127.0.0.1"}; const unsigned int port = 4242; @@ -39,7 +39,7 @@ TEST(Udp, BindRecvStop) { } -TEST(Udp, ReadTrySend) { +TEST(UDP, ReadTrySend) { const std::string address = std::string{"127.0.0.1"}; const unsigned int port = 4242; @@ -70,7 +70,7 @@ TEST(Udp, ReadTrySend) { } -TEST(Udp, ReadSend) { +TEST(UDP, ReadSend) { const std::string address = std::string{"127.0.0.1"}; const unsigned int port = 4242; @@ -104,7 +104,7 @@ TEST(Udp, ReadSend) { } -TEST(Udp, Sock) { +TEST(UDP, Sock) { const std::string address = std::string{"127.0.0.1"}; const unsigned int port = 4242; diff --git a/test/uvw/util.cpp b/test/uvw/util.cpp index 16174c4e..077075da 100644 --- a/test/uvw/util.cpp +++ b/test/uvw/util.cpp @@ -113,7 +113,7 @@ TEST(Util, Utilities) { guessHandle(tag{}, uvw::HandleType::IDLE); guessHandle(tag{}, uvw::HandleType::PIPE); guessHandle(tag{}, uvw::HandleType::PREPARE); - guessHandle(tag{}, uvw::HandleType::TCP); + guessHandle(tag{}, uvw::HandleType::TCP); guessHandle(tag{}, uvw::HandleType::TIMER); guessHandle(tag{}, uvw::HandleType::UDP); guessHandle(tag{}, uvw::HandleType::SIGNAL);