Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
TestThreading Class Reference
+ Inheritance diagram for TestThreading:
+ Collaboration diagram for TestThreading:

Public Member Functions

 TestThreading ()
 
const char * getName ()
 
void runTests (IGameDef *gamedef)
 
void testStartStopWait ()
 
void testAtomicSemaphoreThread ()
 
void testTLS ()
 
- 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

◆ TestThreading()

TestThreading::TestThreading ( )
inline

References TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestThreading::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestThreading::runTests ( IGameDef * gamedef)
virtual

Implements TestBase.

References TEST, testAtomicSemaphoreThread(), testStartStopWait(), and testTLS().

+ Here is the call graph for this function:

◆ testAtomicSemaphoreThread()

void TestThreading::testAtomicSemaphoreThread ( )

References Semaphore::post(), and UASSERT.

Referenced by runTests().

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

◆ testStartStopWait()

void TestThreading::testStartStopWait ( )

References Thread::getReturnValue(), Thread::isCurrentThread(), Thread::isRunning(), sleep_ms, Thread::start(), Thread::stop(), UASSERT, and Thread::wait().

Referenced by runTests().

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

◆ testTLS()

void TestThreading::testTLS ( )

References g_tls_broken, Thread::start(), Thread::stop(), UASSERT, and Thread::wait().

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: