gem5  v20.1.0.0
Classes | Macros | Functions
socket.test.cc File Reference
#include <gtest/gtest.h>
#include "base/socket.hh"

Go to the source code of this file.

Classes

class  MockListenSocket
 

Macros

#define TEST_PORT_1   7893
 
#define TEST_PORT_2   7894
 

Functions

 TEST (SocketTest, DefaultBehavior)
 
 TEST (SocketTest, DisableAll)
 
 TEST (SocketTest, ListenToPort)
 
 TEST (SocketTest, ListenToPortReuseFalse)
 
 TEST (SocketTest, RelistenWithSameInstanceSamePort)
 
 TEST (SocketTest, RelistenWithSameInstanceDifferentPort)
 
 TEST (SocketTest, RelistenWithDifferentInstanceOnDifferentPort)
 
 TEST (SocketTest, RelistenWithDifferentInstanceOnSamePort)
 
 TEST (SocketTest, AcceptError)
 

Macro Definition Documentation

◆ TEST_PORT_1

#define TEST_PORT_1   7893

Definition at line 33 of file socket.test.cc.

◆ TEST_PORT_2

#define TEST_PORT_2   7894

Definition at line 34 of file socket.test.cc.

Function Documentation

◆ TEST() [1/9]

TEST ( SocketTest  ,
AcceptError   
)

Definition at line 164 of file socket.test.cc.

References ListenSocket::accept(), and EXPECT_EQ.

◆ TEST() [2/9]

TEST ( SocketTest  ,
DefaultBehavior   
)

◆ TEST() [3/9]

TEST ( SocketTest  ,
DisableAll   
)

◆ TEST() [4/9]

TEST ( SocketTest  ,
ListenToPort   
)

◆ TEST() [5/9]

TEST ( SocketTest  ,
ListenToPortReuseFalse   
)

◆ TEST() [6/9]

TEST ( SocketTest  ,
RelistenWithDifferentInstanceOnDifferentPort   
)

Definition at line 140 of file socket.test.cc.

References EXPECT_TRUE, ListenSocket::listen(), TEST_PORT_1, and TEST_PORT_2.

◆ TEST() [7/9]

TEST ( SocketTest  ,
RelistenWithDifferentInstanceOnSamePort   
)

Definition at line 152 of file socket.test.cc.

References EXPECT_FALSE, EXPECT_TRUE, ListenSocket::listen(), and TEST_PORT_1.

◆ TEST() [8/9]

TEST ( SocketTest  ,
RelistenWithSameInstanceDifferentPort   
)

◆ TEST() [9/9]

TEST ( SocketTest  ,
RelistenWithSameInstanceSamePort   
)

Definition at line 98 of file socket.test.cc.

References EXPECT_EQ, EXPECT_TRUE, expected, ListenSocket::listen(), and TEST_PORT_1.


Generated on Wed Sep 30 2020 14:02:18 for gem5 by doxygen 1.8.17