Use Mock UDP port

This commit is contained in:
2020-04-15 14:24:41 +02:00
parent 055eeb0065
commit 796facc182
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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)
{
+2 -2
View File
@@ -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);