From 796facc182ba77b0a9535e0d2e356b0cd60aa2a2 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Wed, 15 Apr 2020 14:24:41 +0200 Subject: [PATCH] Use Mock UDP port --- core-writer/test/mock/udp.hpp | 2 +- core-writer/test/test_UdpReceiver.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core-writer/test/mock/udp.hpp b/core-writer/test/mock/udp.hpp index 9e23039..1cef271 100644 --- a/core-writer/test/mock/udp.hpp +++ b/core-writer/test/mock/udp.hpp @@ -1,7 +1,7 @@ #ifndef MOCK_UDP_H #define MOCK_UDP_H -const int UDP_PORT(13000); +const int MOCK_UDP_PORT(13000); sockaddr_in get_server_address(uint16_t udp_port) { diff --git a/core-writer/test/test_UdpReceiver.cpp b/core-writer/test/test_UdpReceiver.cpp index 3af65e1..4f215e5 100644 --- a/core-writer/test/test_UdpReceiver.cpp +++ b/core-writer/test/test_UdpReceiver.cpp @@ -7,7 +7,7 @@ TEST(UdpReceiver, simple_recv) { - uint16_t udp_port = 12000; + uint16_t udp_port = MOCK_UDP_PORT; auto send_socket_fd = socket(AF_INET,SOCK_DGRAM,0); ASSERT_TRUE(send_socket_fd >= 0); @@ -48,7 +48,7 @@ TEST(UdpReceiver, simple_recv) TEST(UdpReceiver, false_recv) { - uint16_t udp_port = 12000; + uint16_t udp_port = MOCK_UDP_PORT; auto send_socket_fd = socket(AF_INET,SOCK_DGRAM,0); ASSERT_TRUE(send_socket_fd >= 0);