Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestEvent.cpp File Reference
#include "threads/Event.h"
#include "threads/IRunnable.h"
#include "threads/test/TestHelpers.h"
#include <memory>
#include <stdio.h>

Classes

class  waiter
 
class  timed_waiter
 
class  group_wait
 
class  mass_waiter
 
class  poll_mass_waiter
 

Macros

#define TESTNUM   100000l
 
#define NUMTHREADS   100l
 

Functions

 TEST (TestEvent, General)
 
 TEST (TestEvent, TwoWaits)
 
 TEST (TestEvent, TimedWaits)
 
 TEST (TestEvent, TimedWaitsTimeout)
 
 TEST (TestEvent, Group)
 
 TEST (TestEvent, TwoGroups)
 
 TEST (TestEvent, AutoResetBehavior)
 
 TEST (TestEvent, ManualReset)
 
 TEST (TestEvent, InitVal)
 
 TEST (TestEvent, SimpleTimeout)
 
 TEST (TestEvent, GroupChildSet)
 
 TEST (TestEvent, GroupChildSet2)
 
 TEST (TestEvent, GroupWaitResetsChild)
 
 TEST (TestEvent, GroupTimedWait)
 
template<class W >
void RunMassEventTest (std::vector< std::shared_ptr< W > > &m, bool canWaitOnEvent)
 
 TEST (TestMassEvent, General)
 
 TEST (TestMassEvent, Polling)
 

Variables

CEventg_event = NULL
 
std::atomic< long > g_mutex
 

Macro Definition Documentation

◆ NUMTHREADS

#define NUMTHREADS   100l

◆ TESTNUM

#define TESTNUM   100000l

Function Documentation

◆ RunMassEventTest()

template<class W >
void RunMassEventTest ( std::vector< std::shared_ptr< W > > & m,
bool canWaitOnEvent )

◆ TEST() [1/16]

TEST ( TestEvent ,
AutoResetBehavior  )

◆ TEST() [2/16]

TEST ( TestEvent ,
General  )

◆ TEST() [3/16]

TEST ( TestEvent ,
Group  )

◆ TEST() [4/16]

TEST ( TestEvent ,
GroupChildSet  )

◆ TEST() [5/16]

TEST ( TestEvent ,
GroupChildSet2  )

◆ TEST() [6/16]

TEST ( TestEvent ,
GroupTimedWait  )

◆ TEST() [7/16]

TEST ( TestEvent ,
GroupWaitResetsChild  )

◆ TEST() [8/16]

TEST ( TestEvent ,
InitVal  )

◆ TEST() [9/16]

TEST ( TestEvent ,
ManualReset  )

◆ TEST() [10/16]

TEST ( TestEvent ,
SimpleTimeout  )

◆ TEST() [11/16]

TEST ( TestEvent ,
TimedWaits  )

◆ TEST() [12/16]

TEST ( TestEvent ,
TimedWaitsTimeout  )

◆ TEST() [13/16]

TEST ( TestEvent ,
TwoGroups  )

◆ TEST() [14/16]

TEST ( TestEvent ,
TwoWaits  )

◆ TEST() [15/16]

TEST ( TestMassEvent ,
General  )

◆ TEST() [16/16]

TEST ( TestMassEvent ,
Polling  )

Variable Documentation

◆ g_event

CEvent* g_event = NULL

◆ g_mutex

std::atomic<long> g_mutex