Minetest  5.4.0
TestConnection Class Reference
+ Inheritance diagram for TestConnection:
+ Collaboration diagram for TestConnection:

Public Member Functions

 TestConnection ()
 
const char * getName ()
 
void runTests (IGameDef *gamedef)
 
void testNetworkPacketSerialize ()
 
void testHelpers ()
 
void testConnectSendReceive ()
 
- Public Member Functions inherited from TestBase
bool testModule (IGameDef *gamedef)
 
std::string getTestTempDirectory ()
 
std::string getTestTempFile ()
 

Additional Inherited Members

- Public Attributes inherited from TestBase
u32 num_tests_failed
 
u32 num_tests_run
 

Constructor & Destructor Documentation

◆ TestConnection()

TestConnection::TestConnection ( )
inline

References INTERNET_SIMULATOR, and TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char* TestConnection::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestConnection::runTests ( IGameDef gamedef)
virtual

Implements TestBase.

References TEST, testConnectSendReceive(), testHelpers(), and testNetworkPacketSerialize().

+ Here is the call graph for this function:

◆ testConnectSendReceive()

void TestConnection::testConnectSendReceive ( )

References Handler::count, g_settings, Settings::get(), NetworkPacket::getPeerId(), NetworkPacket::getSize(), SharedBuffer< T >::getSize(), porting::getTimeMs(), NetworkPacket::getU8Ptr(), infostream, Address::isIPv6(), Handler::last_id, porting::mt_snprintf(), NetworkPacket::oldForgePacket(), PEER_ID_SERVER, NetworkPacket::putRawPacket(), Address::Resolve(), sleep_ms, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testHelpers()

void TestConnection::testHelpers ( )

References con::BufferedPacket::data, SharedBuffer< T >::getSize(), con::makePacket(), con::makeReliablePacket(), con::PACKET_TYPE_RELIABLE, readU16(), readU32(), readU8(), and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testNetworkPacketSerialize()

void TestConnection::testNetworkPacketSerialize ( )

References SharedBuffer< T >::getSize(), NetworkPacket::oldForgePacket(), NetworkPacket::putRawPacket(), UASSERT, UASSERTEQ, and warningstream.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: