gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 35 of file socket.test.cc.

Referenced by TEST().

◆ TEST_PORT_2

#define TEST_PORT_2   7894

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

Referenced by TEST().

Function Documentation

◆ TEST() [1/9]

TEST ( SocketTest  ,
DefaultBehavior   
)

◆ TEST() [2/9]

TEST ( SocketTest  ,
DisableAll   
)

◆ TEST() [3/9]

TEST ( SocketTest  ,
ListenToPort   
)

◆ TEST() [4/9]

TEST ( SocketTest  ,
ListenToPortReuseFalse   
)

◆ TEST() [5/9]

TEST ( SocketTest  ,
RelistenWithSameInstanceSamePort   
)

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

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

◆ TEST() [6/9]

TEST ( SocketTest  ,
RelistenWithSameInstanceDifferentPort   
)

◆ TEST() [7/9]

TEST ( SocketTest  ,
RelistenWithDifferentInstanceOnDifferentPort   
)

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

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

◆ TEST() [8/9]

TEST ( SocketTest  ,
RelistenWithDifferentInstanceOnSamePort   
)

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

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

◆ TEST() [9/9]

TEST ( SocketTest  ,
AcceptError   
)

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

References ListenSocket::accept(), and EXPECT_EQ.


Generated on Fri Feb 28 2020 16:27:06 for gem5 by doxygen 1.8.13