UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
test_events.cpp File Reference
#include "test_shared.h"
#include "../common/common.h"
#include "../client/battlescape/events/e_parse.h"
#include "../client/cl_shared.h"
#include <string>

Go to the source code of this file.

Data Structures

class  EventsTest
 

Functions

 TEST_F (EventsTest, Range)
 
 TEST_F (EventsTest, Events)
 
ScheduleEventPtr Dequeue_Event (int now)
 Finds and returns the first event in the event_queue that is due. If the event has a check function, we check to see if the event can be run now, and skip it if not (even if it is due). More...
 
 TEST_F (EventsTest, Scheduler)
 
static bool delayCheck (int now, void *data)
 
 TEST_F (EventsTest, SchedulerCheck)
 
static bool delayCheckBlocked (int now, void *data)
 
 TEST_F (EventsTest, Blocked)
 

Variables

static bool delayCheckBlockedVal = false
 

Function Documentation

static bool delayCheck ( int  now,
void data 
)
static

Definition at line 83 of file test_events.cpp.

Referenced by TEST_F().

static bool delayCheckBlocked ( int  now,
void data 
)
static

Definition at line 129 of file test_events.cpp.

References delayCheckBlockedVal.

Referenced by TEST_F().

ScheduleEventPtr Dequeue_Event ( int  now)

Finds and returns the first event in the event_queue that is due. If the event has a check function, we check to see if the event can be run now, and skip it if not (even if it is due).

Returns
Returns a pointer to the event, nullptr if none found.

Definition at line 1415 of file common.cpp.

References Delay_Events(), eventQueue, and i.

Referenced by Qcommon_Frame(), and TEST_F().

TEST_F ( EventsTest  ,
Range   
)

Definition at line 43 of file test_events.cpp.

References EV_NUM_EVENTS, and EVENT_INSTANTLY.

TEST_F ( EventsTest  ,
Scheduler   
)

Definition at line 61 of file test_events.cpp.

References Dequeue_Event(), and Schedule_Event().

TEST_F ( EventsTest  ,
SchedulerCheck   
)

Definition at line 95 of file test_events.cpp.

References delayCheck(), Dequeue_Event(), and Schedule_Event().

TEST_F ( EventsTest  ,
Blocked   
)

Variable Documentation

bool delayCheckBlockedVal = false
static

Definition at line 128 of file test_events.cpp.

Referenced by delayCheckBlocked(), and TEST_F().