Luanti 5.16.0-dev
Loading...
Searching...
No Matches
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 ()
void runTest (const char *name, std::function< void()> &&test)

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, NetworkPacket::getPeerId(), Buffer< T >::getSize(), NetworkPacket::getSize(), NetworkPacket::getString(), porting::getTimeMs(), infostream, Address::isIPv6(), Handler::last_id, porting::mt_snprintf(), NetworkPacket::oldForgePacket(), PEER_ID_SERVER, NetworkPacket::putRawString(), 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 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 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: